|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ByteParser
Interface for reading binary data.
Method Summary | |
---|---|
byte |
getByte()
Returns the next byte available. |
int |
getByteAsInt()
Returns the next unsigned byte available as an int . |
byte[] |
getBytes(int count)
Returns an array of the next count bytes. |
long |
getInt()
Returns the unsigned value of the next 4 bytes as a long . |
ByteParser |
getNewParser()
Deprecated. This feature is not applicable to streams, so it should not be used. Instead either a mark / reset along with a byte array read approach should be used instead. |
int |
getPosition()
Returns the current position of this parser. |
int |
getShortAsInt()
Returns the unsigned value of the next two bytes available in the parser as an int . |
boolean |
hasMore()
Returns true if the end of the underlying data source has not been reached yet. |
int |
peekByte()
Returns an unsigned value of the next byte in this parser, without advancing the position of the parser. |
void |
setBigEndian(boolean bigEndian)
Sets the big-endian mode of this parser. |
Method Detail |
---|
byte getByte()
byte[] getBytes(int count)
count
bytes.
count
- the number of bytes to read.
int getByteAsInt()
int
.
int getShortAsInt()
int
.
long getInt()
long
.
@Deprecated ByteParser getNewParser()
void setBigEndian(boolean bigEndian)
bigEndian
- a boolean value true for big-endian mode, false
for non-big-endian mode.boolean hasMore()
int getPosition()
int peekByte()
getByteAsInt()
other
than for the fact that the position is not advanced.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |