|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.io.OutputStream
com.tangosol.io.WrapperOutputStream
public class WrapperOutputStream
This is an OutputStream class that delegates to another OutputStream. Primarily, this is intended as a base class for building specific-purpose OutputStream wrappers.
| Field Summary | |
|---|---|
protected OutputStream |
m_out
The underlying OutputStream object to use. |
| Constructor Summary | |
|---|---|
WrapperOutputStream()
Construct an uninitialized WrapperOutputStream. |
|
WrapperOutputStream(OutputStream out)
Construct a WrapperOutputStream that will output to the specified OutputStream object. |
|
| Method Summary | |
|---|---|
void |
close()
Closes this OutputStream and releases any associated system resources. |
protected OutputStream |
ensureOutputStream()
Return the underlying OutputStream. |
void |
flush()
Flushes this OutputStream and forces any buffered output bytes to be written. |
OutputStream |
getOutputStream()
Obtain the underlying OutputStream. |
void |
setOutputStream(OutputStream out)
Specify the underlying OutputStream. |
void |
write(byte[] ab)
Writes all the bytes in the array ab. |
void |
write(byte[] ab,
int of,
int cb)
Writes cb bytes starting at offset of from
the array ab. |
void |
write(int b)
Writes the eight low-order bits of the argument b. |
| Field Detail |
|---|
protected OutputStream m_out
| Constructor Detail |
|---|
public WrapperOutputStream()
public WrapperOutputStream(OutputStream out)
out - an OutputStream object to write to| Method Detail |
|---|
public OutputStream getOutputStream()
protected OutputStream ensureOutputStream()
IllegalStateException - if the underlying stream has not been
specified.public void setOutputStream(OutputStream out)
out - the stream to be wrapped
IllegalStateException - if the underlying stream has already been
specified.
public void write(int b)
throws IOException
b. The 24
high-order bits of b are ignored.
write in interface OutputStreamingwrite in class OutputStreamb - the byte to write (passed as an integer)
IOException - if an I/O error occurs
public void write(byte[] ab)
throws IOException
ab.
write in interface OutputStreamingwrite in class OutputStreamab - the byte array to write
IOException - if an I/O error occurs
NullPointerException - if ab is
null
public void write(byte[] ab,
int of,
int cb)
throws IOException
cb bytes starting at offset of from
the array ab.
write in interface OutputStreamingwrite in class OutputStreamab - the byte array to write fromof - the offset into ab to start writing fromcb - the number of bytes from ab to write
IOException - if an I/O error occurs
NullPointerException - if ab is
null
IndexOutOfBoundsException - if of is negative,
or cb is negative, or of+cb is
greater than ab.length
public void flush()
throws IOException
flush in interface OutputStreamingflush in interface Flushableflush in class OutputStreamIOException - if an I/O error occurs
public void close()
throws IOException
close in interface OutputStreamingclose in interface Closeableclose in class OutputStreamIOException - if an I/O error occurs
|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||