|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BinaryInput
Interface for classes that can read a binary data.
Such data can be processed by a BinarySerializator
.
Method Summary | |
---|---|
java.nio.ByteBuffer |
readInput(int minBytes)
Returns a buffer that contains at least minBytes bytes. |
long |
skip(long n)
Skips over and discards n bytes of data from this input. |
Method Detail |
---|
java.nio.ByteBuffer readInput(int minBytes) throws java.io.IOException
minBytes
bytes.
If the buffer with the required number of bytes cannot be provided, an
IOException
is thrown. Note that the returned
buffer can provide more than minBytes
.
minBytes
- the minimal number of bytes that must be available for reading from the buffer
java.io.IOException
- if there was an error while preparing a buffer with minBytes
byteslong skip(long n) throws java.io.IOException
n
bytes of data from this input.
The skip
method may, for a variety of reasons, end
up skipping over some smaller number of bytes, possibly 0
.
This may result from any of a number of conditions; reaching end of file
before n
bytes have been skipped is only one possibility.
The actual number of bytes skipped is returned.
n
- the number of bytes to be skipped
java.io.IOException
- if the input does not support seek or some other I/O error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |