"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "pdfbox/src/main/java/org/apache/pdfbox/filter/Filter.java" between
pdfbox-2.0.23-src.zip and pdfbox-2.0.24-src.zip

About: Apache PDFBox is a Java PDF library tool that allows creation of new PDF documents, manipulation of existing documents and the ability to extract content from documents.

Filter.java  (pdfbox-2.0.23-src):Filter.java  (pdfbox-2.0.24-src)
skipping to change at line 152 skipping to change at line 152
* Finds a suitable image reader for a format. * Finds a suitable image reader for a format.
* *
* @param formatName The format to search for. * @param formatName The format to search for.
* @param errorCause The probably cause if something goes wrong. * @param errorCause The probably cause if something goes wrong.
* @return The image reader for the format. * @return The image reader for the format.
* @throws MissingImageReaderException if no image reader is found. * @throws MissingImageReaderException if no image reader is found.
*/ */
protected static ImageReader findImageReader(String formatName, String error Cause) throws MissingImageReaderException protected static ImageReader findImageReader(String formatName, String error Cause) throws MissingImageReaderException
{ {
Iterator<ImageReader> readers = ImageIO.getImageReadersByFormatName(form atName); Iterator<ImageReader> readers = ImageIO.getImageReadersByFormatName(form atName);
ImageReader reader = null; ImageReader reader;
while (readers.hasNext()) while (readers.hasNext())
{ {
reader = readers.next(); reader = readers.next();
if (reader != null && reader.canReadRaster()) if (reader != null && reader.canReadRaster())
{ {
break; return reader;
} }
} }
if (reader == null) throw new MissingImageReaderException("Cannot read " + formatName + " im
{ age: " + errorCause);
throw new MissingImageReaderException("Cannot read " + formatName +
" image: " + errorCause);
}
return reader;
} }
/** /**
* @return the ZIP compression level configured for PDFBox * @return the ZIP compression level configured for PDFBox
*/ */
public static int getCompressionLevel() public static int getCompressionLevel()
{ {
int compressionLevel = Deflater.DEFAULT_COMPRESSION; int compressionLevel = Deflater.DEFAULT_COMPRESSION;
try try
{ {
 End of changes. 3 change blocks. 
8 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)