|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-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 to| Method Detail |
|---|
public java.nio.ByteBuffer getByteBuffer()
public void write(int b)
throws java.io.IOException
write in interface OutputStreamingwrite in class java.io.OutputStreamb - the bytejava.io.IOException - if an I/O error occurs
public 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 OutputStreamingwrite in class java.io.OutputStreamabSrc - the dataofSrc - the start offset in the datacbSrc - the number of bytes to writejava.io.IOException - if an I/O error occurs
public void flush()
throws java.io.IOException
flush in interface OutputStreamingflush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOException - if an I/O error occurs
public void close()
throws java.io.IOException
close in interface OutputStreamingclose in interface java.io.Closeableclose in class java.io.OutputStreamjava.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® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||