221222223224225226227228229230
byte[] buf = new byte[4096]; int len; while ((len = in.read(buf)) >= 0) { buffer.write(buf, 0, len); } return new ByteArrayFontInputStream(buffer.toByteArray()); } else { return new FileFontInputStream(new File(src)); } }