private static Font createFont0(int fontFormat, InputStream fontStream,
CreatedFontTracker tracker)
throws java.awt.FontFormatException, java.io.IOException {
if (fontFormat != Font.TRUETYPE_FONT &&
fontFormat != Font.TYPE1_FONT) {
throw new IllegalArgumentException ("font format not recognized");
}
boolean copiedFontData = false;
try {
final File tFile = AccessController.doPrivileged(
new PrivilegedExceptionAction<File>() {
public File run() throws IOException {
return Files.createTempFile("+~JF", ".tmp").toFile();
}
}
);
if (tracker != null) {
tracker.add(tFile);
}
//其他代码略
}