|
fop 0.95 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.fop.fonts.truetype.FontFileReader
Reads a TrueType font file into a byte array and provides file like functions for array access.
| Constructor Summary | |
FontFileReader(java.io.InputStream in)
Constructor |
|
FontFileReader(java.lang.String fileName)
Constructor |
|
| Method Summary | |
byte[] |
getBytes(int offset,
int length)
Return a copy of the internal array |
int |
getCurrentPos()
Returns current file position. |
int |
getFileSize()
Returns the size of the file. |
byte |
read()
Read 1 byte. |
byte |
readTTFByte()
Read 1 signed byte. |
int |
readTTFLong()
Read 4 bytes. |
short |
readTTFShort()
Read 2 bytes signed. |
short |
readTTFShort(long pos)
Read 2 bytes signed at position pos without changing current position. |
java.lang.String |
readTTFString()
Read a NUL terminated ISO-8859-1 string. |
java.lang.String |
readTTFString(int len)
Read an ISO-8859-1 string of len bytes. |
int |
readTTFUByte()
Read 1 unsigned byte. |
long |
readTTFULong()
Read 4 bytes. |
int |
readTTFUShort()
Read 2 bytes unsigned. |
int |
readTTFUShort(long pos)
Read 2 bytes unsigned at position pos without changing current position. |
void |
seekAdd(long add)
Set current file position to offset |
void |
seekSet(long offset)
Set current file position to offset |
void |
skip(long add)
Skip a given number of bytes. |
void |
writeTTFUShort(int pos,
int val)
Write a USHort at a given position. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public FontFileReader(java.lang.String fileName)
throws java.io.IOException
fileName - filename to read
java.io.IOException - In case of an I/O problem
public FontFileReader(java.io.InputStream in)
throws java.io.IOException
in - InputStream to read from
java.io.IOException - In case of an I/O problem| Method Detail |
public void seekSet(long offset)
throws java.io.IOException
offset - The new offset to set
java.io.IOException - In case of an I/O problem
public void seekAdd(long add)
throws java.io.IOException
add - The number of bytes to advance
java.io.IOException - In case of an I/O problem
public void skip(long add)
throws java.io.IOException
add - The number of bytes to advance
java.io.IOException - In case of an I/O problempublic int getCurrentPos()
public int getFileSize()
public byte read()
throws java.io.IOException
java.io.IOException - If EOF is reached
public final byte readTTFByte()
throws java.io.IOException
java.io.IOException - If EOF is reached
public final int readTTFUByte()
throws java.io.IOException
java.io.IOException - If EOF is reached
public final short readTTFShort()
throws java.io.IOException
java.io.IOException - If EOF is reached
public final int readTTFUShort()
throws java.io.IOException
java.io.IOException - If EOF is reached
public final void writeTTFUShort(int pos,
int val)
throws java.io.IOException
pos - The absolute position to write toval - The value to write
java.io.IOException - If EOF is reached
public final short readTTFShort(long pos)
throws java.io.IOException
pos - The absolute position to read from
java.io.IOException - If EOF is reached
public final int readTTFUShort(long pos)
throws java.io.IOException
pos - The absolute position to read from
java.io.IOException - If EOF is reached
public final int readTTFLong()
throws java.io.IOException
java.io.IOException - If EOF is reached
public final long readTTFULong()
throws java.io.IOException
java.io.IOException - If EOF is reached
public final java.lang.String readTTFString()
throws java.io.IOException
java.io.IOException - If EOF is reached
public final java.lang.String readTTFString(int len)
throws java.io.IOException
len - The length of the string to read
java.io.IOException - If EOF is reached
public byte[] getBytes(int offset,
int length)
throws java.io.IOException
offset - The absolute offset to start reading fromlength - The number of bytes to read
java.io.IOException - if out of bounds
|
fop 0.95 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||