|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.fontbox.cff.DataInput
public class DataInput
This class contains some functionality to read a byte buffer.
| 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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DataInput(byte[] buffer)
buffer - the buffer to be read| Method Detail |
|---|
public boolean hasRemaining()
public int getPosition()
public void setPosition(int position)
position - the given position
public String getString()
throws IOException
IOException - if an error occurs during reading
public byte readByte()
throws IOException
IOException - if an error occurs during reading
public int readUnsignedByte()
throws IOException
IOException - if an error occurs during reading
public short readShort()
throws IOException
IOException - if an error occurs during reading
public int readUnsignedShort()
throws IOException
IOException - if an error occurs during reading
public int readInt()
throws IOException
IOException - if an error occurs during reading
public byte[] readBytes(int length)
throws IOException
length - the number of bytes to be read
IOException - if an error occurs during reading
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||