java.lang.Object | |
↳ | com.pnfsoftware.jeb.core.input.BytesInput |
An input object backed by an array of bytes.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
com.pnfsoftware.jeb.core.input.IInput
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
BytesInput(byte[] data)
Create an input object backing up the provided array of bytes.
| |||||||||||
BytesInput(byte[] data, int offset, int length)
Create an input object backing up the provided array of bytes.
| |||||||||||
BytesInput(byte[] data, int offset, int length, String name)
Create an input object backing up the provided array of bytes.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
boolean |
canRead()
Determine whether this input is readable.
| ||||||||||
void |
close()
Close that input and free all resources used by this object.
| ||||||||||
SeekableByteChannel |
getChannel()
Get a seekable read-only channel representing the input.
| ||||||||||
long |
getCurrentSize()
Provide the current input size of the input data.
| ||||||||||
ByteBuffer |
getHeader()
Get a read-only, big-endian buffer of the first input bytes.
| ||||||||||
String |
getName()
Retrieve the optional input name.
| ||||||||||
InputStream |
getStream()
Get the input stream.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.pnfsoftware.jeb.core.input.IInput
|
Create an input object backing up the provided array of bytes.
data | non-null byte array |
---|
Create an input object backing up the provided array of bytes.
data | non-null byte array |
---|---|
offset | start offset in the array |
length | number of bytes to be backed |
Create an input object backing up the provided array of bytes.
data | non-null byte array |
---|---|
offset | start offset in the array |
length | number of bytes to be backed |
name | optional name |
Determine whether this input is readable.
Close that input and free all resources used by this object.
Get a seekable read-only channel representing the input. Each call returns a unique channel. Clients should use this method to efficiently read at various locations within the given input.
Provide the current input size of the input data.
Get a read-only, big-endian buffer of the first input bytes. Clients should not attempt to
modify or directly access that buffer. The initial position is set to 0. It is recommended
that implementations provide at least IDEAL_HEADER_SIZE
bytes.
Retrieve the optional input name.
Get the input stream. Each call returns a unique stream. Implementors should offer this
method for convenience. The implementor is responsible for closing non-closed streams when
close()
is called.