@Test(timeout = 1000) public void streamLengthCorrection8() throws IOException { synchronized (this) { String filename = sourceFolder + "simpleCanvasWithDrawingWithInvalidStreamLength3.pdf"; PdfReader.correctStreamLength = true; PdfDocument pdfDoc = new PdfDocument(new PdfReader(filename)); PdfPage page = pdfDoc.getPage(1); page.getPdfObject().get(PdfName.MediaBox); byte[] content = page.getFirstContentStream().getBytes(); Assert.assertEquals(697, content.length); pdfDoc.close(); } }
public void close() throws IOException { tokens.close(); }
PdfReader implements Closeable, Serializable { public void close() throws IOException { tokens.close(); } }
PdfReader implements Closeable, Serializable { public void close() throws IOException { tokens.close(); } PdfReader(IRandomAccessSource byteSource, ReaderProperties properties);  PdfReader(InputStream is, ReaderProperties properties);  PdfReader(java.io.File file);  PdfReader(InputStream is);  PdfReader(String filename, ReaderProperties properties);  PdfReader(String filename); }
PdfReader implements Closeable, Serializable { public void close() throws IOException { tokens.close(); } PdfReader(IRandomAccessSource byteSource, ReaderProperties properties);  PdfReader(InputStream is, ReaderProperties properties);  PdfReader(java.io.File file);  PdfReader(InputStream is);  PdfReader(String filename, ReaderProperties properties);  PdfReader(String filename); void close(); PdfReader setUnethicalReading(boolean unethicalReading); PdfReader setMemorySavingMode(boolean memorySavingMode); boolean isCloseStream(); void setCloseStream(boolean closeStream); boolean hasRebuiltXref(); boolean hasHybridXref(); boolean hasXrefStm(); boolean hasFixedXref(); long getLastXref(); byte[] readStreamBytes(PdfStream stream, boolean decode); byte[] readStreamBytesRaw(PdfStream stream); InputStream readStream(PdfStream stream, boolean decode); static byte[] decodeBytes(byte[] b, PdfDictionary streamDictionary); static byte[] decodeBytes(byte[] b, PdfDictionary streamDictionary, Map<PdfName, IFilterHandler> filterHandlers); RandomAccessFileOrArray getSafeFile(); long getFileLength(); boolean isOpenedWithFullPermission(); long getPermissions(); int getCryptoMode(); PdfAConformanceLevel getPdfAConformanceLevel(); byte[] computeUserPassword(); byte[] getOriginalFileId(); byte[] getModifiedFileId(); boolean isEncrypted(); }
PdfReader implements Closeable, Serializable { public void close() throws IOException { tokens.close(); } PdfReader(IRandomAccessSource byteSource, ReaderProperties properties);  PdfReader(InputStream is, ReaderProperties properties);  PdfReader(java.io.File file);  PdfReader(InputStream is);  PdfReader(String filename, ReaderProperties properties);  PdfReader(String filename); void close(); PdfReader setUnethicalReading(boolean unethicalReading); PdfReader setMemorySavingMode(boolean memorySavingMode); boolean isCloseStream(); void setCloseStream(boolean closeStream); boolean hasRebuiltXref(); boolean hasHybridXref(); boolean hasXrefStm(); boolean hasFixedXref(); long getLastXref(); byte[] readStreamBytes(PdfStream stream, boolean decode); byte[] readStreamBytesRaw(PdfStream stream); InputStream readStream(PdfStream stream, boolean decode); static byte[] decodeBytes(byte[] b, PdfDictionary streamDictionary); static byte[] decodeBytes(byte[] b, PdfDictionary streamDictionary, Map<PdfName, IFilterHandler> filterHandlers); RandomAccessFileOrArray getSafeFile(); long getFileLength(); boolean isOpenedWithFullPermission(); long getPermissions(); int getCryptoMode(); PdfAConformanceLevel getPdfAConformanceLevel(); byte[] computeUserPassword(); byte[] getOriginalFileId(); byte[] getModifiedFileId(); boolean isEncrypted();  }