Build 1.0_r1(from source)

javax.crypto
Class CipherOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by javax.crypto.CipherOutputStream
All Implemented Interfaces:
Closeable, Flushable

public class CipherOutputStream
extends FilterOutputStream


Field Summary
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
protected CipherOutputStream(OutputStream os)
           
  CipherOutputStream(OutputStream os, Cipher c)
           
 
Method Summary
 void close()
          Close this FilterOutputStream.
 void flush()
          Flush this FilterOutputStream to ensure all pending data is sent out to the target OutputStream.
 void write(byte[] b)
          Writes the entire contents of the byte array buffer to this FilterOutputStream.
 void write(byte[] b, int off, int len)
          Writes count bytes from the byte array buffer starting at offset to this FilterOutputStream.
 void write(int b)
          Writes the specified byte oneByte to this FilterOutputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CipherOutputStream

public CipherOutputStream(OutputStream os,
                          Cipher c)

CipherOutputStream

protected CipherOutputStream(OutputStream os)
Method Detail

write

public void write(int b)
           throws IOException
Description copied from class: FilterOutputStream
Writes the specified byte oneByte to this FilterOutputStream. Only the low order byte of oneByte is written. This implementation writes the byte to the target OutputStream.

Overrides:
write in class FilterOutputStream
Parameters:
b - the byte to be written
Throws:
IOException - If an error occurs attempting to write to this FilterOutputStream.

write

public void write(byte[] b)
           throws IOException
Description copied from class: FilterOutputStream
Writes the entire contents of the byte array buffer to this FilterOutputStream. This implementation writes the buffer to the target stream.

Overrides:
write in class FilterOutputStream
Parameters:
b - the buffer to be written
Throws:
IOException - If an error occurs attempting to write to this FilterOutputStream.

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
Description copied from class: FilterOutputStream
Writes count bytes from the byte array buffer starting at offset to this FilterOutputStream. This implementation writes the buffer to the target OutputStream.

Overrides:
write in class FilterOutputStream
Parameters:
b - the buffer to be written
off - offset in buffer to get bytes
len - number of bytes in buffer to write
Throws:
IOException - If an error occurs attempting to write to this FilterOutputStream.

flush

public void flush()
           throws IOException
Description copied from class: FilterOutputStream
Flush this FilterOutputStream to ensure all pending data is sent out to the target OutputStream. This implementation flushes the target OutputStream.

Specified by:
flush in interface Flushable
Overrides:
flush in class FilterOutputStream
Throws:
IOException - If an error occurs attempting to flush this FilterOutputStream.

close

public void close()
           throws IOException
Description copied from class: FilterOutputStream
Close this FilterOutputStream. This implementation closes the target stream.

Specified by:
close in interface Closeable
Overrides:
close in class FilterOutputStream
Throws:
IOException - If an error occurs attempting to close this stream.

Build 1.0_r1(from source)

Please submit a feedback, bug or feature