class FontFileReader extends java.lang.Object implements FontConstants
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
FontFileReader.Buffer |
| Modifier and Type | Field and Description |
|---|---|
(package private) java.lang.String |
filename |
(package private) long |
filesize |
(package private) java.io.RandomAccessFile |
raFile |
private byte[] |
readBuffer |
private int |
readBufferLen |
private static int |
READBUFFERSIZE |
private int |
readBufferStart |
cmapTag, DIRECTORYENTRYSIZE, DIRECTORYHEADERSIZE, headTag, hheaTag, hmtxTag, maxpTag, nameTag, os_2Tag, ottoTag, postTag, trueTag, ttcfTag, TTCHEADERSIZE, v1ttTag, WOFFDIRECTORYENTRYSIZE, WOFFHEADERSIZE, woffTag| Constructor and Description |
|---|
FontFileReader(java.lang.String filename) |
| Modifier and Type | Method and Description |
|---|---|
void |
closeFile() |
java.lang.String |
getFilename() |
long |
getLength() |
boolean |
openFile()
Opens the file.
|
FontFileReader.Buffer |
readBlock(int offset,
int len) |
private int |
readFromFile(byte[] buffer,
long seekPos,
int requestedLen)
Called internally to readBlock().
|
void |
reset() |
java.lang.String filename
long filesize
java.io.RandomAccessFile raFile
private static final int READBUFFERSIZE
private byte[] readBuffer
private int readBufferLen
private int readBufferStart
public java.lang.String getFilename()
public boolean openFile()
throws java.security.PrivilegedActionException
java.security.PrivilegedActionExceptionpublic void closeFile()
throws java.io.IOException
java.io.IOExceptionpublic long getLength()
public void reset()
throws java.io.IOException
java.io.IOExceptionprivate int readFromFile(byte[] buffer,
long seekPos,
int requestedLen)
public FontFileReader.Buffer readBlock(int offset, int len)