public Binary
An interface to represent something that one can read binary data from in a blocking or non-blocking way. This interface is intended for read access only.
Modifier and Type | Method and Description |
---|---|
java.nio.ByteBuffer |
getBuffer()
Read the content of this binary to a single byte buffer.
|
java.nio.channels.ReadableByteChannel |
getChannel()
Get non-blocking byte channel
|
java.io.InputStream |
getStream()
Get blocking input stream for this binary
|
long |
size()
The size of this binary. Negative value corresponds to undefined size.
|
Binary EMPTY
java.io.InputStream getStream()
Get blocking input stream for this binary
java.nio.channels.ReadableByteChannel getChannel()
Get non-blocking byte channel
java.nio.ByteBuffer getBuffer()
Read the content of this binary to a single byte buffer.
long size()
The size of this binary. Negative value corresponds to undefined size.