com.pnfsoftware.jeb.core.input.IInput |
Known Indirect Subclasses |
Standard input interface for units.
Note: Since users of IInput
are responsible for closing generated streams
and channels
, the implementation of close()
is
optional, and client code may call it (optionally) as a safety mechanism.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | IDEAL_HEADER_SIZE |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract boolean |
canRead()
Determine whether this input is readable.
| ||||||||||
abstract void |
close()
Close that input and free all resources used by this object.
| ||||||||||
abstract SeekableByteChannel |
getChannel()
Get a seekable read-only channel representing the input.
| ||||||||||
abstract long |
getCurrentSize()
Provide the current input size of the input data.
| ||||||||||
abstract ByteBuffer |
getHeader()
Get a read-only, big-endian buffer of the first input bytes.
| ||||||||||
abstract String |
getName()
Retrieve the optional input name.
| ||||||||||
abstract InputStream |
getStream()
Get the input stream.
|
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.
IOException | on IO error |
---|
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.
IOException | on IO error |
---|