public void seek(long pos) throws IOException { file.seek(pos); }
public void seek(long pos) throws IOException { file.seek(pos); }
@Deprecated //TODO: remove all references to this call, then remove this method public void reOpen() throws IOException { seek(0); }
@Deprecated //TODO: remove all references to this call, then remove this method public void reOpen() throws IOException { seek(0); }
void seek(int offset) { try { buf.seek(offset); } catch (Exception e) { throw new ExceptionConverter(e); } }
void seek(int offset) { try { buf.seek(offset); } catch (Exception e) { throw new ExceptionConverter(e); } }
public char checkPdfHeader() throws IOException { file.seek(0); String str = readString(1024); int idx = str.indexOf("%PDF-"); if (idx != 0) throw new InvalidPdfException(MessageLocalization.getComposedMessage("pdf.header.not.found")); return str.charAt(7); }
private void readMarkArrayTable(int markArrayLocation) throws IOException { rf.seek(markArrayLocation); int markCount = rf.readShort(); List<MarkRecord> markRecords = new ArrayList<GlyphPositioningTableReader.MarkRecord>(); for (int i = 0; i < markCount; i++) { markRecords.add(readMarkRecord()); } for (MarkRecord markRecord : markRecords) { readAnchorTable(markArrayLocation + markRecord.markAnchorOffset); } }
public char checkPdfHeader() throws IOException { file.seek(0); String str = readString(1024); int idx = str.indexOf("%PDF-"); if (idx != 0) throw new InvalidPdfException(MessageLocalization.getComposedMessage("pdf.header.not.found")); return str.charAt(7); }
private void readMarkArrayTable(int markArrayLocation) throws IOException { rf.seek(markArrayLocation); int markCount = rf.readShort(); List<MarkRecord> markRecords = new ArrayList<GlyphPositioningTableReader.MarkRecord>(); for (int i = 0; i < markCount; i++) { markRecords.add(readMarkRecord()); } for (MarkRecord markRecord : markRecords) { readAnchorTable(markArrayLocation + markRecord.markAnchorOffset); } }
private void readLookUpType_8(int lookupTableLocation) throws IOException { rf.seek(lookupTableLocation); int posFormat = rf.readShort(); if (posFormat == 3) { LOG.debug("Reading `Look Up Type 8, Format 3` ...."); readChainingContextPositioningFormat_3(lookupTableLocation); } else { System.err.println("The posFormat " + posFormat + " for `Look Up Type 8` is not supported by " + GlyphPositioningTableReader.class.getSimpleName()); } }
private void readLookUpType_8(int lookupTableLocation) throws IOException { rf.seek(lookupTableLocation); int posFormat = rf.readShort(); if (posFormat == 3) { LOG.debug("Reading `Look Up Type 8, Format 3` ...."); readChainingContextPositioningFormat_3(lookupTableLocation); } else { System.err.println("The posFormat " + posFormat + " for `Look Up Type 8` is not supported by " + GlyphPositioningTableReader.class.getSimpleName()); } }
private void readAnchorTable(int anchorTableLocation) throws IOException { rf.seek(anchorTableLocation); int anchorFormat = rf.readShort(); if (anchorFormat != 1) { System.err.println("The extra features of the AnchorFormat " + anchorFormat + " will not be used"); } int x = rf.readShort(); int y = rf.readShort(); }
public void checkFdfHeader() throws IOException { file.seek(0); String str = readString(1024); int idx = str.indexOf("%FDF-"); if (idx != 0) throw new InvalidPdfException(MessageLocalization.getComposedMessage("fdf.header.not.found")); }
private void readAnchorTable(int anchorTableLocation) throws IOException { rf.seek(anchorTableLocation); int anchorFormat = rf.readShort(); if (anchorFormat != 1) { System.err.println("The extra features of the AnchorFormat " + anchorFormat + " will not be used"); } int x = rf.readShort(); int y = rf.readShort(); }
public void checkFdfHeader() throws IOException { file.seek(0); String str = readString(1024); int idx = str.indexOf("%FDF-"); if (idx != 0) throw new InvalidPdfException(MessageLocalization.getComposedMessage("fdf.header.not.found")); }
private void readLigatureSetTable(int ligatureSetTableLocation, int coverageGlyphId) throws IOException { rf.seek(ligatureSetTableLocation); int ligatureCount = rf.readShort(); LOG.debug("ligatureCount=" + ligatureCount); List<Integer> ligatureOffsets = new ArrayList<Integer>(ligatureCount); for (int i = 0; i < ligatureCount; i++) { int ligatureOffset = rf.readShort(); ligatureOffsets.add(ligatureOffset); } for (int ligatureOffset : ligatureOffsets) { readLigatureTable(ligatureSetTableLocation + ligatureOffset, coverageGlyphId); } }
private void readLigatureSetTable(int ligatureSetTableLocation, int coverageGlyphId) throws IOException { rf.seek(ligatureSetTableLocation); int ligatureCount = rf.readShort(); LOG.debug("ligatureCount=" + ligatureCount); List<Integer> ligatureOffsets = new ArrayList<Integer>(ligatureCount); for (int i = 0; i < ligatureCount; i++) { int ligatureOffset = rf.readShort(); ligatureOffsets.add(ligatureOffset); } for (int ligatureOffset : ligatureOffsets) { readLigatureTable(ligatureSetTableLocation + ligatureOffset, coverageGlyphId); } }
private void readFeatureTable(final int featureTableLocationOffset) throws IOException { rf.seek(featureTableLocationOffset); int featureParamsOffset = rf.readShort(); LOG.debug("featureParamsOffset=" + featureParamsOffset); int lookupCount = rf.readShort(); LOG.debug("lookupCount=" + lookupCount); List<Short> lookupListIndices = new ArrayList<Short>(lookupCount); for (int i = 0; i < lookupCount; i++) { lookupListIndices.add(rf.readShort()); } // LOG.debug("lookupListIndices=" + lookupListIndices); }
private void readLangSysTable(final int langSysTableLocationOffset) throws IOException { rf.seek(langSysTableLocationOffset); int lookupOrderOffset = rf.readShort(); LOG.debug("lookupOrderOffset=" + lookupOrderOffset); int reqFeatureIndex = rf.readShort(); LOG.debug("reqFeatureIndex=" + reqFeatureIndex); int featureCount = rf.readShort(); List<Short> featureListIndices = new ArrayList<Short>(featureCount); for (int i = 0; i < featureCount; i++) { featureListIndices.add(rf.readShort()); } LOG.debug("featureListIndices=" + featureListIndices); }