/** * This method is invoked while deserialization */ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { in.defaultReadObject(); if (sourcePath != null && tokens == null) { tokens = getOffsetTokeniser(new RandomAccessSourceFactory().setForceRead(false).createBestSource(sourcePath)); } }
/** * Reads and parses a PDF document. * * @param filename the file name of the document * @param properties properties of the created reader * @throws IOException on error */ public PdfReader(String filename, ReaderProperties properties) throws IOException { this( new RandomAccessSourceFactory() .setForceRead(false) .createBestSource(filename), properties ); this.sourcePath = filename; }