Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

oracle.adfnmc.java.io
Class FilterOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by oracle.adfnmc.java.io.FilterOutputStream
Direct Known Subclasses:
BufferedOutputStream

public class FilterOutputStream
extends java.io.OutputStream

FilteredOutputStream is a class which takes an output stream and filters the output in some way. The filtered view may be a buffered output or one which compresses data before actually writing the bytes. FilterOutputStreams are meant for byte streams.

See Also:
FilterInputStream

Field Summary
protected  java.io.OutputStream out
          The target OutputStream for this filter.
 
Constructor Summary
FilterOutputStream(java.io.OutputStream out)
          Constructs a new FilterOutputStream on the OutputStream out.
 
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[] buffer)
          Writes the entire contents of the byte array buffer to this FilterOutputStream.
 void write(byte[] buffer, int offset, int count)
          Writes count bytes from the byte array buffer starting at offset to this FilterOutputStream.
 void write(int oneByte)
          Writes the specified byte oneByte to this FilterOutputStream.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

out

protected java.io.OutputStream out
The target OutputStream for this filter.

Constructor Detail

FilterOutputStream

public FilterOutputStream(java.io.OutputStream out)
Constructs a new FilterOutputStream on the OutputStream out. All writes are now filtered through this stream.

Parameters:
out - the target OutputStream to filter writes on.
Method Detail

close

public void close()
           throws java.io.IOException
Close this FilterOutputStream. This implementation closes the target stream.

Overrides:
close in class java.io.OutputStream
Throws:
java.io.IOException - If an error occurs attempting to close this stream.

flush

public void flush()
           throws java.io.IOException
Flush this FilterOutputStream to ensure all pending data is sent out to the target OutputStream. This implementation flushes the target OutputStream.

Overrides:
flush in class java.io.OutputStream
Throws:
java.io.IOException - If an error occurs attempting to flush this FilterOutputStream.

write

public void write(byte[] buffer)
           throws java.io.IOException
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 java.io.OutputStream
Parameters:
buffer - the buffer to be written
Throws:
java.io.IOException - If an error occurs attempting to write to this FilterOutputStream.

write

public void write(byte[] buffer,
                  int offset,
                  int count)
           throws java.io.IOException
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 java.io.OutputStream
Parameters:
buffer - the buffer to be written
offset - offset in buffer to get bytes
count - number of bytes in buffer to write
Throws:
java.io.IOException - If an error occurs attempting to write to this FilterOutputStream.
java.lang.IndexOutOfBoundsException - If offset or count are outside of bounds.

write

public void write(int oneByte)
           throws java.io.IOException
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.

Specified by:
write in class java.io.OutputStream
Parameters:
oneByte - the byte to be written
Throws:
java.io.IOException - If an error occurs attempting to write to this FilterOutputStream.

Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

Copyright © 2011, Oracle and/or its affiliates. All rights reserved.