public void readFully(byte b[]) throws IOException { readFully(b, 0, b.length); }
public void readFully(byte b[]) throws IOException { readFully(b, 0, b.length); }
private String readString(int n) throws IOException { byte b[] = new byte[n]; in.readFully(b); int k; for (k = 0; k < b.length; ++k) { if (b[k] == 0) break; } return new String(b, 0, k, "ISO-8859-1"); }
private String readString(int n) throws IOException { byte b[] = new byte[n]; in.readFully(b); int k; for (k = 0; k < b.length; ++k) { if (b[k] == 0) break; } return new String(b, 0, k, "ISO-8859-1"); }
/** Reads a <CODE>String</CODE> from the font file as bytes using the Cp1252 * encoding. * @param length the length of bytes to read * @return the <CODE>String</CODE> read * @throws IOException the font file could not be read */ protected String readStandardString(int length) throws IOException { byte buf[] = new byte[length]; rf.readFully(buf); try { return new String(buf, BaseFont.WINANSI); } catch (Exception e) { throw new ExceptionConverter(e); } }
/** Reads a <CODE>String</CODE> from the font file as bytes using the Cp1252 * encoding. * @param length the length of bytes to read * @return the <CODE>String</CODE> read * @throws IOException the font file could not be read */ protected String readStandardString(int length) throws IOException { byte buf[] = new byte[length]; rf.readFully(buf); try { return new String(buf, BaseFont.WINANSI); } catch (Exception e) { throw new ExceptionConverter(e); } }
/** Reads a <CODE>String</CODE> from the font file as bytes using the given * encoding. * @param length the length of bytes to read * @param encoding the given encoding * @return the <CODE>String</CODE> read * @throws IOException the font file could not be read */ public String readString(int length, String encoding) throws IOException { byte buf[] = new byte[length]; readFully(buf); try { return new String(buf, encoding); } catch (Exception e) { throw new ExceptionConverter(e); } }
/** Reads a <CODE>String</CODE> from the font file as bytes using the given * encoding. * @param length the length of bytes to read * @param encoding the given encoding * @return the <CODE>String</CODE> read * @throws IOException the font file could not be read */ public String readString(int length, String encoding) throws IOException { byte buf[] = new byte[length]; readFully(buf); try { return new String(buf, encoding); } catch (Exception e) { throw new ExceptionConverter(e); } }
if (len > 0) { rf.seek(tableGlyphOffset + start); rf.readFully(newGlyfTable, glyfPtr, len); glyfPtr += len;
if (len > 0) { rf.seek(tableGlyphOffset + start); rf.readFully(newGlyfTable, glyfPtr, len); glyfPtr += len;
buf.readFully(NewObjects, start+unusedOffset, end-start); } else { NewObjects[start+unusedOffset] = OperatorForUnusedEntries;
buf.readFully(NewObjects, start+unusedOffset, end-start); } else { NewObjects[start+unusedOffset] = OperatorForUnusedEntries;
buf.readFully(NewObjects, start + unusedOffset, end - start); } else { NewObjects[start + unusedOffset] = OperatorForUnusedEntries;
protected byte[] getFullFont() throws IOException { RandomAccessFileOrArray rf2 = null; try { rf2 = new RandomAccessFileOrArray(rf); rf2.reOpen(); byte b[] = new byte[(int) rf2.length()]; rf2.readFully(b); return b; } finally { try { if (rf2 != null) { rf2.close(); } } catch (Exception e) { } } }
protected byte[] getFullFont() throws IOException { RandomAccessFileOrArray rf2 = null; try { rf2 = new RandomAccessFileOrArray(rf); rf2.reOpen(); byte b[] = new byte[(int) rf2.length()]; rf2.readFully(b); return b; } finally { try { if (rf2 != null) { rf2.close(); } } catch (Exception e) { } } }
/** * If this font file is using the Compact Font File Format, then this method * will return the raw bytes needed for the font stream. If this method is * ever made public: make sure to add a test if (cff == true). * * @return a byte array * @since 2.1.3 */ protected byte[] readCffFont() throws IOException { RandomAccessFileOrArray rf2 = new RandomAccessFileOrArray(rf); byte b[] = new byte[cffLength]; try { rf2.reOpen(); rf2.seek(cffOffset); rf2.readFully(b); } finally { try { rf2.close(); } catch (Exception e) { // empty on purpose } } return b; }
/** * If this font file is using the Compact Font File Format, then this method * will return the raw bytes needed for the font stream. If this method is * ever made public: make sure to add a test if (cff == true). * * @return a byte array * @since 2.1.3 */ protected byte[] readCffFont() throws IOException { RandomAccessFileOrArray rf2 = new RandomAccessFileOrArray(rf); byte b[] = new byte[cffLength]; try { rf2.reOpen(); rf2.seek(cffOffset); rf2.readFully(b); } finally { try { rf2.close(); } catch (Exception e) { // empty on purpose } } return b; }
rf.readFully(outFont, fontPtr, tableLocation[TABLE_LENGTH]); fontPtr += tableLocation[TABLE_LENGTH] + 3 & ~3;
b = new byte[stream.getLength()]; file.seek(stream.getOffset()); file.readFully(b); PdfEncryption decrypt = reader.getDecrypt(); if (decrypt != null) {
b = new byte[stream.getLength()]; file.seek(stream.getOffset()); file.readFully(b); PdfEncryption decrypt = reader.getDecrypt(); if (decrypt != null) {