Top Inners Fields Constructors Methods
com.sun.javafx.font

pack-priv Class FontFileWriter

extends Object
implements FontConstants
Class Inheritance
All Implemented Interfaces
com.sun.javafx.font.FontConstants
Known Direct Subclasses
com.sun.javafx.font.WoffDecoder, com.sun.javafx.font.DFontDecoder
Imports
java.io.File, .RandomAccessFile, .IOException, java.nio.file.Files, java.util.HashMap, .Map, java.util.concurrent.Semaphore, .TimeUnit

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv File
pack-priv byte[]
pack-priv int
pack-priv int
pack-priv RandomAccessFile
pack-priv FontFileWriter.FontTracker
pack-priv int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
checkSize(int size)

private void
checkTracker(int size)

public void
public void
public File
public boolean
public File
public void
seek(int pos)

private void
setHeaderPos(int pos)

protected void
setLength(int size)

public void
writeBytes(byte[] buffer)

public void
writeBytes(byte[] buffer, int startPos, int length)

public void
writeDirectoryEntry(int index, int tag, int checksum, int offset, int length)

public void
writeHeader(int format, short numTables)

private void
writeInt(int value)

private void
writeShort(short value)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fileback to summary
pack-priv File file
headerPosback to summary
pack-priv int headerPos
posback to summary
pack-priv int pos
raFileback to summary
pack-priv RandomAccessFile raFile
trackerback to summary
pack-priv FontFileWriter.FontTracker tracker
writtenBytesback to summary
pack-priv int writtenBytes

Constructor Detail

FontFileWriterback to summary
public FontFileWriter()

Method Detail

checkSizeback to summary
private void checkSize(int size) throws IOException
checkTrackerback to summary
private void checkTracker(int size) throws IOException
closeFileback to summary
public void closeFile() throws IOException
deleteFileback to summary
public void deleteFile()
getFileback to summary
public File getFile()
isTrackingback to summary
public boolean isTracking()
openFileback to summary
public File openFile() throws IOException
seekback to summary
public void seek(int pos) throws IOException
setHeaderPosback to summary
private void setHeaderPos(int pos)
setLengthback to summary
protected void setLength(int size) throws IOException
writeBytesback to summary
public void writeBytes(byte[] buffer) throws IOException
writeBytesback to summary
public void writeBytes(byte[] buffer, int startPos, int length) throws IOException
writeDirectoryEntryback to summary
public void writeDirectoryEntry(int index, int tag, int checksum, int offset, int length)
writeHeaderback to summary
public void writeHeader(int format, short numTables) throws IOException
writeIntback to summary
private void writeInt(int value)
writeShortback to summary
private void writeShort(short value)
com.sun.javafx.font back to summary

pack-priv Class FontFileWriter.FontTracker

extends Object
Class Inheritance

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
FontFileWriter.FontTracker.TempFileDeletionHook

Helper class for cleanup of temp files created while processing fonts.

Field Summary

Modifier and TypeField and Description
private static Semaphore
public static final int
public static final int
pack-priv static int
pack-priv static FontFileWriter.FontTracker

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public boolean
public void
add(File file)

public synchronized void
addBytes(int sz)

private static synchronized Semaphore
getCS()

Returns a counting semaphore.

public synchronized int
public static synchronized FontFileWriter.FontTracker
public void
public void
remove(File file)

public void
public synchronized void
subBytes(int sz)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

csback to summary
private static Semaphore cs
MAX_FILE_SIZEback to summary
public static final int MAX_FILE_SIZE
MAX_TOTAL_BYTESback to summary
public static final int MAX_TOTAL_BYTES
numBytesback to summary
pack-priv static int numBytes
trackerback to summary
pack-priv static FontFileWriter.FontTracker tracker

Constructor Detail

FontTrackerback to summary
pack-priv FontTracker()

Method Detail

acquirePermitback to summary
public boolean acquirePermit() throws InterruptedException
addback to summary
public void add(File file)
addBytesback to summary
public synchronized void addBytes(int sz)
getCSback to summary
private static synchronized Semaphore getCS()

Returns a counting semaphore.

getNumBytesback to summary
public synchronized int getNumBytes()
getTrackerback to summary
public static synchronized FontFileWriter.FontTracker getTracker()
releasePermitback to summary
public void releasePermit()
removeback to summary
public void remove(File file)
setback to summary
public void set(File file, RandomAccessFile raf)
subBytesback to summary
public synchronized void subBytes(int sz)
com.sun.javafx.font back to summary

private Class FontFileWriter.FontTracker.TempFileDeletionHook

extends Object
Class Inheritance
  • java.lang.Object
  • com.sun.javafx.font.FontFileWriter.FontTracker.TempFileDeletionHook

Helper class for cleanup of temp files created while processing fonts.

Field Summary

Modifier and TypeField and Description
private static HashMap<File, RandomAccessFile>
private static Thread
t

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv static synchronized void
add(File file)

pack-priv static void
init()

pack-priv static synchronized void
remove(File file)

pack-priv static synchronized void
pack-priv static synchronized void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

filesback to summary
private static HashMap<File, RandomAccessFile> files
tback to summary
private static Thread t

Constructor Detail

TempFileDeletionHookback to summary
private TempFileDeletionHook()

Method Detail

addback to summary
pack-priv static synchronized void add(File file)
initback to summary
pack-priv static void init()
removeback to summary
pack-priv static synchronized void remove(File file)
runHooksback to summary
pack-priv static synchronized void runHooks()
setback to summary
pack-priv static synchronized void set(File file, RandomAccessFile raf)