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.IOException
public void seek(int pos) throws java.io.IOException
java.io.IOException
public java.io.File getFile()
public java.io.File openFile() throws java.security.PrivilegedActionException
java.security.PrivilegedActionException
public void closeFile() throws java.io.IOException
java.io.IOException
public void deleteFile()
public boolean isTracking()
private void checkTracker(int size) throws java.io.IOException
java.io.IOException
private void checkSize(int size) throws java.io.IOException
java.io.IOException
private void setHeaderPos(int pos)
public void writeHeader(int format, short numTables) throws java.io.IOException
java.io.IOException
public void writeDirectoryEntry(int index, int tag, int checksum, int offset, int length) throws java.io.IOException
java.io.IOException
private void writeInt(int value) throws java.io.IOException
java.io.IOException
private void writeShort(short value) throws java.io.IOException
java.io.IOException
public void writeBytes(byte[] buffer) throws java.io.IOException
java.io.IOException
public void writeBytes(byte[] buffer, int startPos, int length) throws java.io.IOException
java.io.IOException
static boolean hasTempPermission()