org.apache.fontbox.ttf
public abstract class TTFDataStream extends Object
Version: $Revision: 1.1 $
| Method Summary | |
|---|---|
| abstract void | close()
Close the underlying resources.
|
| abstract long | getCurrentPosition()
Get the current position in the stream. |
| abstract InputStream | getOriginalData()
This will get the original data file that was used for this
stream.
|
| abstract int | read()
Read an unsigned byte. |
| byte[] | read(int numberOfBytes)
Read a specific number of bytes from the stream. |
| abstract int | read(byte[] b, int off, int len) |
| float | read32Fixed()
Read a 16.16 fixed value, where the first 16 bits are the decimal and the last
16 bits are the fraction. |
| Calendar | readInternationalDate()
Read an eight byte international date.
|
| abstract long | readLong()
Read an unsigned byte. |
| int | readSignedByte()
Read a signed byte. |
| abstract short | readSignedShort()
Read an signed short.
|
| String | readString(int length)
Read a fixed length ascii string. |
| String | readString(int length, String charset)
Read a fixed length ascii string. |
| long | readUnsignedInt()
Read an unsigned integer. |
| abstract int | readUnsignedShort()
Read an unsigned short.
|
| int[] | readUnsignedShortArray(int length)
Read an unsigned short array.
|
| abstract void | seek(long pos)
Seek into the datasource.
|
Throws: IOException If there is an error closing the resources.
Returns: The current position in the stream.
Throws: IOException If an error occurs while reading the stream.
Returns: The data that was read from.
Throws: IOException If there is an issue reading the data.
Returns: An unsigned byte.
Throws: IOException If there is an error reading the data.
Parameters: numberOfBytes The number of bytes to read.
Returns: The byte buffer.
Throws: IOException If there is an error while reading.
Parameters: b The buffer to write to. off The offset into the buffer. len The length into the buffer.
Returns: The number of bytes read.
Throws: IOException If there is an error reading from the stream.
See Also: java.io.InputStream#read( byte[], int, int )
Returns: A 32 bit value.
Throws: IOException If there is an error reading the data.
Returns: An signed short.
Throws: IOException If there is an error reading the data.
Returns: An unsigned byte.
Throws: IOException If there is an error reading the data.
Returns: A signed byte.
Throws: IOException If there is an error reading the data.
Returns: An signed short.
Throws: IOException If there is an error reading the data.
Parameters: length The length of the string to read.
Returns: A string of the desired length.
Throws: IOException If there is an error reading the data.
Parameters: length The length of the string to read in bytes. charset The expected character set of the string.
Returns: A string of the desired length.
Throws: IOException If there is an error reading the data.
Returns: An unsiged integer.
Throws: IOException If there is an error reading the data.
Returns: An unsigned short.
Throws: IOException If there is an error reading the data.
Parameters: length The length of the array to read.
Returns: An unsigned short array.
Throws: IOException If there is an error reading the data.
Parameters: pos The position to seek to.
Throws: IOException If there is an error seeking to that position.