class FontFileWriter extends java.lang.Object implements FontConstants
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
FontFileWriter.FontTracker |
| Modifier and Type | Field and Description |
|---|---|
(package private) java.io.File |
file |
(package private) byte[] |
header |
(package private) int |
headerPos |
(package private) int |
pos |
(package private) java.io.RandomAccessFile |
raFile |
(package private) FontFileWriter.FontTracker |
tracker |
(package private) int |
writtenBytes |
cmapTag, DIRECTORYENTRYSIZE, DIRECTORYHEADERSIZE, headTag, hheaTag, hmtxTag, maxpTag, nameTag, os_2Tag, ottoTag, postTag, trueTag, ttcfTag, TTCHEADERSIZE, v1ttTag, WOFFDIRECTORYENTRYSIZE, WOFFHEADERSIZE, woffTag| Constructor and Description |
|---|
FontFileWriter() |
| Modifier and Type | Method and Description |
|---|---|
private void |
checkSize(int size) |
private void |
checkTracker(int size) |
void |
closeFile() |
void |
deleteFile() |
java.io.File |
getFile() |
(package private) static boolean |
hasTempPermission()
Used with the byte count tracker for fonts created from streams.
|
boolean |
isTracking() |
java.io.File |
openFile() |
void |
seek(int pos) |
private void |
setHeaderPos(int pos) |
protected void |
setLength(int size) |
void |
writeBytes(byte[] buffer) |
void |
writeBytes(byte[] buffer,
int startPos,
int length) |
void |
writeDirectoryEntry(int index,
int tag,
int checksum,
int offset,
int length) |
void |
writeHeader(int format,
short numTables) |
private void |
writeInt(int value) |
private void |
writeShort(short value) |
byte[] header
int pos
int headerPos
int writtenBytes
FontFileWriter.FontTracker tracker
java.io.File file
java.io.RandomAccessFile raFile
protected void setLength(int size)
throws java.io.IOException
java.io.IOExceptionpublic void seek(int pos)
throws java.io.IOException
java.io.IOExceptionpublic java.io.File getFile()
public java.io.File openFile()
throws java.security.PrivilegedActionException
java.security.PrivilegedActionExceptionpublic void closeFile()
throws java.io.IOException
java.io.IOExceptionpublic void deleteFile()
public boolean isTracking()
private void checkTracker(int size)
throws java.io.IOException
java.io.IOExceptionprivate void checkSize(int size)
throws java.io.IOException
java.io.IOExceptionprivate void setHeaderPos(int pos)
public void writeHeader(int format,
short numTables)
throws java.io.IOException
java.io.IOExceptionpublic void writeDirectoryEntry(int index,
int tag,
int checksum,
int offset,
int length)
throws java.io.IOException
java.io.IOExceptionprivate void writeInt(int value)
throws java.io.IOException
java.io.IOExceptionprivate void writeShort(short value)
throws java.io.IOException
java.io.IOExceptionpublic void writeBytes(byte[] buffer)
throws java.io.IOException
java.io.IOExceptionpublic void writeBytes(byte[] buffer,
int startPos,
int length)
throws java.io.IOException
java.io.IOExceptionstatic boolean hasTempPermission()