|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.io.InputStream
|
+--net.rim.device.api.crypto.CryptoInputStream
A CryptoInputStream contains some other input stream, which it
uses as its basic source of data, transforming the data along
the way or providing additional functionality.
The class CryptoInputStream itself simply overrides all methods of InputStream with versions that pass all requests to the contained input stream. Subclasses of CryptoInputStream may further override some of these methods and may also provide additional methods and fields.
| Field Summary | ||
|
protected InputStream |
_inputStream
The input stream to be operated on. |
| Constructor Summary | ||
|
protected |
CryptoInputStream(InputStream in)
Creates a CryptoInputStream object, input stream filter built on top of the specified input stream. |
| Method Summary | ||
|
int |
available()
Returns the number of bytes that can be read from this input stream without blocking. |
|
void |
close()
Closes this input stream and releases any system resources associated with the stream. |
|
abstract String |
getAlgorithm()
Returns the name of this algorithm, eg "DES". |
|
InputStream |
getInputStream()
Returns the input stream associated with this class. |
|
boolean |
markSupported()
Returns a boolean indicating whether mark() is supported. |
|
int |
read()
Reads the next byte of data from this input stream. |
|
int |
read(byte[] buffer)
Reads as many bytes of data from this input stream as are necessary to fill the given byte array. |
|
abstract int |
read(byte[] buffer,
int offset,
int length)
Reads up to the specified number of bytes from this input stream into an array of bytes. |
| Methods inherited from class java.io.InputStream |
mark, reset, skip |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected InputStream _inputStream
| Constructor Detail |
protected CryptoInputStream(InputStream in)
CryptoInputStream object, input stream filter built on top of the specified input stream.
in - The underlying input stream to be assigned to this CryptoInputStream.| Method Detail |
public int available()
throws IOException
available in class InputStreamIOException - Thrown if an I/O error occurs.
public void close()
throws IOException
close in class InputStreamIOException - Thrown if an I/O error occurs.public abstract String getAlgorithm()
public InputStream getInputStream()
inputStream object.public boolean markSupported()
mark() is supported.
The mark() method is not presently supported, so this always returns false.
markSupported in class InputStream
InputStreamtrue if this true type supports the mark and reset
method; false otherwise.InputStream.mark(int),
InputStream.reset()
public int read()
throws IOException
The value byte is returned as an int in the range 0 to 255. If no byte is available because the end of the stream has been reached, the value -1 is returned. This method blocks until input data is available, the end of the stream is detected, or an exception is thrown.
read in class InputStreamIOException - Thrown if an I/O error occurs.
public int read(byte[] buffer)
throws IOException
This method blocks until some input is available.
read in class InputStreambuffer - The buffer into which the data is read.IOException - Thrown if an I/O error occurs.
public abstract int read(byte[] buffer,
int offset,
int length)
throws IOException
read in class InputStreambuffer - The buffer into which the data is read.offset - The starting offset within the buffer, to store the data.length - The maximum number of bytes to read.IOException - Thrown if an I/O error occurs.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2007 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.