|
Oracle® Coherence Java API Reference Release 3.7.1.0 E22843-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
java.io.OutputStream
com.tangosol.io.nio.ByteBufferOutputStream
public class ByteBufferOutputStream
An OutputStream implementation on top of a Java NIO ByteBuffer.
Constructor Summary | |
---|---|
ByteBufferOutputStream(java.nio.ByteBuffer buffer) Construct a ByteBufferOutputStream on a ByteBuffer object. |
Method Summary | |
---|---|
void |
close() Close the stream, flushing any accumulated bytes. |
void |
flush() Flush any accumulated bytes. |
java.nio.ByteBuffer |
getByteBuffer() Obtain the ByteBuffer that this OutputStream is based on. |
protected static java.lang.String |
includeMessage(java.lang.Throwable e) Provide a "suffix" containing the exception message (if any). |
protected java.lang.NullPointerException |
potentialStreamClosedException(java.lang.NullPointerException e) Check if an NPE is caused by the stream being closed. |
void |
write(byte[] abSrc, int ofSrc, int cbSrc) Writes len bytes from the specified byte array starting at offset off to this output stream. |
void |
write(int b) Writes the specified byte to this output stream. |
Methods inherited from class java.io.OutputStream |
---|
write |
Methods inherited from interface com.tangosol.io.OutputStreaming |
---|
write |
Constructor Detail |
---|
public ByteBufferOutputStream(java.nio.ByteBuffer buffer)
buffer
- the ByteBuffer to write the data toMethod Detail |
---|
public java.nio.ByteBuffer getByteBuffer()
public void write(int b) throws java.io.IOException
write
in interface OutputStreaming
write
in class java.io.OutputStream
b
- the byte
java.io.IOException
- if an I/O error occurspublic void write(byte[] abSrc, int ofSrc, int cbSrc) throws java.io.IOException
len
bytes from the specified byte array starting at offset off
to this output stream.
If b
is null
, a NullPointerException
is thrown.
If off
is negative, or len
is negative, or off+len
is greater than the length of the array b
, then an IndexOutOfBoundsException is thrown.
write
in interface OutputStreaming
write
in class java.io.OutputStream
abSrc
- the dataofSrc
- the start offset in the datacbSrc
- the number of bytes to writejava.io.IOException
- if an I/O error occurspublic void flush() throws java.io.IOException
flush
in interface OutputStreaming
flush
in interface java.io.Flushable
flush
in class java.io.OutputStream
java.io.IOException
- if an I/O error occurspublic void close() throws java.io.IOException
close
in interface OutputStreaming
close
in interface java.io.Closeable
close
in class java.io.OutputStream
java.io.IOException
- if an I/O error occursprotected static java.lang.String includeMessage(java.lang.Throwable e)
e
- an exception (any Throwable object)protected java.lang.NullPointerException potentialStreamClosedException(java.lang.NullPointerException e) throws java.io.IOException
e
- an NPEjava.io.IOException
- if the stream is closed
|
Oracle® Coherence Java API Reference Release 3.7.1.0 E22843-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |