org.apache.fontbox.cff
public class DataInput extends Object
Version: $Revision$
| Constructor Summary | |
|---|---|
| DataInput(byte[] buffer)
Constructor. | |
| Method Summary | |
|---|---|
| int | getPosition()
Returns the current position. |
| String | getString()
Returns the buffer as an ISO-8859-1 string. |
| boolean | hasRemaining()
Determines if there are any bytes left to read or not. |
| 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. |
Parameters: buffer the buffer to be read
Returns: current position
Returns: the buffer as string
Throws: IOException if an error occurs during reading
Returns: true if there are any bytes left to read
Returns: the byte
Throws: IOException if an error occurs during reading
Parameters: length the number of bytes to be read
Returns: an array with containing the bytes from the buffer
Throws: IOException if an error occurs during reading
Returns: the int value
Throws: IOException if an error occurs during reading
Returns: the short value
Throws: IOException if an error occurs during reading
Returns: the unsigned byte as int
Throws: IOException if an error occurs during reading
Returns: the unsigned short value as int
Throws: IOException if an error occurs during reading
Parameters: position the given position