| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.OutputStream
net.rim.device.api.crypto.CryptoOutputStream
public abstract class CryptoOutputStream
The superclass of all classes that filter output streams. These streams sit on top of an already existing output stream (the underlying output stream) which it uses as its basic sink of data, but possibly transforming the data along the way or providing additional functionality.
The class CryptoOutputStream itself simply overrides all methods of OutputStream with versions that pass all requests to the underlying output stream. Subclasses of CryptoOutputStream may further override some of these methods as well as provide additional methods and fields.
OutputStream, 
InputStream| Field Summary | ||
|---|---|---|
 | 
protected  OutputStream | 
_out
The underlying output stream to be filtered.  | 
| Constructor Summary | ||
|---|---|---|
 | 
CryptoOutputStream(OutputStream out)
Creates a CryptoOutputStream object, an  output stream filter built on top of the specified output stream. | 
|
| Method Summary | ||
|---|---|---|
 | 
 void | 
close()
Closes the output stream.  | 
 | 
 void | 
flush()
Flushes out the remainder of the data in the output stream.  | 
 | 
abstract  String | 
getAlgorithm()
Returns the name of this algorithm, eg "DES".  | 
 | 
 OutputStream | 
getOutputStream()
Returns the output stream associated with this class.  | 
 | 
 void | 
write(byte[] buffer)
Writes a byte array to this output stream.  | 
 | 
abstract  void | 
write(byte[] buffer,
      int offset,
      int length)
Writes a specified length of bytes from the given byte array to this output stream.  | 
 | 
 void | 
write(int datum)
Writes the specified byte to this output stream.  | 
| Methods inherited from class java.lang.Object | 
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected OutputStream _out
| Constructor Detail | 
|---|
public CryptoOutputStream(OutputStream out)
CryptoOutputStream object, an  output stream filter built on top of the specified output stream.
 
out - The output stream to be assigned to this CryptoOutputStream.| Method Detail | 
|---|
public abstract String getAlgorithm()
public OutputStream getOutputStream()
OutputStream object.
public void write(int datum)
           throws IOException
write in class OutputStreamdatum - an integer containing the byte that will be
 written to the output stream.  This is not
 a call that writes an entire integer but
 rather it writes one byte of that integer
 to the outputstream.
 
IOException - Thrown if an I/O error occurs.
public void write(byte[] buffer)
           throws IOException
Note that this method does not call the one-argument write method of its underlying stream with the single argument buffer.
write in class OutputStreambuffer - A byte array containing the bytes that are
 going to be written to the output stream.
 
IOException - Thrown if an I/O error occurs.OutputStream.write(byte[], int, int)
public abstract void write(byte[] buffer,
                           int offset,
                           int length)
                    throws IOException
write in class OutputStreambuffer - The byte array containing the bytes that are
 going to be written to the output stream.offset - The offset in the byte array where the method
 will start writing from.length - The number of bytes that will be written to 
 the output stream.
 
IOException - Thrown if an I/O error occurs.
public void flush()
           throws IOException
flush in class OutputStreamIOException - Thrown if an I/O error occurs.
public void close()
           throws IOException
Before closing the stream, it flushes out all of the data that is in the output stream.
See the flush() method for more information.
close in class OutputStreamIOException - Thrown if an I/O error occurs.
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2011 Research In Motion Limited.  295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8.  All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal