|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.fontbox.ttf.TTFDataStream
An interface into a data stream.
| Constructor Summary | |
TTFDataStream()
|
|
| 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. |
abstract int |
read(byte[] b,
int off,
int len)
|
byte[] |
read(int numberOfBytes)
Read a specific number of bytes from the stream. |
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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TTFDataStream()
| Method Detail |
public float read32Fixed()
throws IOException
IOException - If there is an error reading the data.
public String readString(int length)
throws IOException
length - The length of the string to read.
IOException - If there is an error reading the data.
public String readString(int length,
String charset)
throws IOException
length - The length of the string to read in bytes.charset - The expected character set of the string.
IOException - If there is an error reading the data.
public abstract int read()
throws IOException
IOException - If there is an error reading the data.
public abstract long readLong()
throws IOException
IOException - If there is an error reading the data.
public int readSignedByte()
throws IOException
IOException - If there is an error reading the data.
public long readUnsignedInt()
throws IOException
IOException - If there is an error reading the data.
public abstract int readUnsignedShort()
throws IOException
IOException - If there is an error reading the data.
public int[] readUnsignedShortArray(int length)
throws IOException
length - The length of the array to read.
IOException - If there is an error reading the data.
public abstract short readSignedShort()
throws IOException
IOException - If there is an error reading the data.
public Calendar readInternationalDate()
throws IOException
IOException - If there is an error reading the data.
public abstract void close()
throws IOException
IOException - If there is an error closing the resources.
public abstract void seek(long pos)
throws IOException
pos - The position to seek to.
IOException - If there is an error seeking to that position.
public byte[] read(int numberOfBytes)
throws IOException
numberOfBytes - The number of bytes to read.
IOException - If there is an error while reading.
public abstract int read(byte[] b,
int off,
int len)
throws IOException
b - The buffer to write to.off - The offset into the buffer.len - The length into the buffer.
IOException - If there is an error reading from the stream.InputStream.read( byte[], int, int )
public abstract long getCurrentPosition()
throws IOException
IOException - If an error occurs while reading the stream.
public abstract InputStream getOriginalData()
throws IOException
IOException - If there is an issue reading the data.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||