CFFDataInput
public class DataInput
extends java.lang.Object
Constructor | Description |
---|---|
DataInput(byte[] buffer) |
Constructor.
|
Modifier and Type | Method | Description |
---|---|---|
int |
getPosition() |
Returns the current position.
|
java.lang.String |
getString() |
Returns the buffer as an ISO-8859-1 string.
|
boolean |
hasRemaining() |
Determines if there are any bytes left to read or not.
|
int |
length() |
|
byte |
readByte() |
Read one single byte from the buffer.
|
byte[] |
readBytes(int length) |
Read a number of single byte values from the buffer.
|
int |
readInt() |
Read one single int (4 bytes) from the buffer.
|
short |
readShort() |
Read one single short value from the buffer.
|
int |
readUnsignedByte() |
Read one single unsigned byte from the buffer.
|
int |
readUnsignedShort() |
Read one single unsigned short (2 bytes) value from the buffer.
|
void |
setPosition(int position) |
Sets the current position to the given value.
|
public DataInput(byte[] buffer)
buffer
- the buffer to be readpublic boolean hasRemaining()
public int getPosition()
public void setPosition(int position)
position
- the given positionpublic java.lang.String getString() throws java.io.IOException
java.io.IOException
- if an error occurs during readingpublic byte readByte() throws java.io.IOException
java.io.IOException
- if an error occurs during readingpublic int readUnsignedByte() throws java.io.IOException
java.io.IOException
- if an error occurs during readingpublic short readShort() throws java.io.IOException
java.io.IOException
- if an error occurs during readingpublic int readUnsignedShort() throws java.io.IOException
java.io.IOException
- if an error occurs during readingpublic int readInt() throws java.io.IOException
java.io.IOException
- if an error occurs during readingpublic byte[] readBytes(int length) throws java.io.IOException
length
- the number of bytes to be readjava.io.IOException
- if an error occurs during readingpublic int length()
Copyright © 2008–2018. All rights reserved.