Class TiffReader
- java.lang.Object
-
- org.apache.commons.imaging.common.BinaryFileParser
-
- org.apache.commons.imaging.formats.tiff.TiffReader
-
public class TiffReader extends BinaryFileParser
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classTiffReader.Collectorprivate static classTiffReader.FirstDirectoryCollectorstatic interfaceTiffReader.Listener
-
Field Summary
Fields Modifier and Type Field Description private booleanbigTiffprivate intentryMaxValueLengthprivate booleanstandardTiffprivate booleanstrict
-
Constructor Summary
Constructors Constructor Description TiffReader(boolean strict)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private JpegImageDatagetJpegRawImageData(ByteSource byteSource, TiffDirectory directory)private java.nio.ByteOrdergetTiffByteOrder(int byteOrderByte)private AbstractTiffImageDatagetTiffRawImageData(ByteSource byteSource, TiffDirectory directory)voidread(ByteSource byteSource, FormatCompliance formatCompliance, TiffReader.Listener listener)TiffContentsreadContents(ByteSource byteSource, TiffImagingParameters params, FormatCompliance formatCompliance)TiffContentsreadDirectories(ByteSource byteSource, boolean readImageData, FormatCompliance formatCompliance)private voidreadDirectories(ByteSource byteSource, FormatCompliance formatCompliance, TiffReader.Listener listener)private booleanreadDirectory(ByteSource byteSource, long directoryOffset, int dirType, FormatCompliance formatCompliance, TiffReader.Listener listener, boolean ignoreNextDirectory, java.util.List<java.lang.Number> visited)private booleanreadDirectory(ByteSource byteSource, long offset, int dirType, FormatCompliance formatCompliance, TiffReader.Listener listener, java.util.List<java.lang.Number> visited)TiffContentsreadFirstDirectory(ByteSource byteSource, boolean readImageData, FormatCompliance formatCompliance)private TiffHeaderreadTiffHeader(java.io.InputStream is)private TiffHeaderreadTiffHeader(ByteSource byteSource)-
Methods inherited from class org.apache.commons.imaging.common.BinaryFileParser
debugNumber, debugNumber, getByteOrder, setByteOrder
-
-
-
-
Method Detail
-
getJpegRawImageData
private JpegImageData getJpegRawImageData(ByteSource byteSource, TiffDirectory directory) throws ImagingException, java.io.IOException
- Throws:
ImagingExceptionjava.io.IOException
-
getTiffByteOrder
private java.nio.ByteOrder getTiffByteOrder(int byteOrderByte) throws ImagingException- Throws:
ImagingException
-
getTiffRawImageData
private AbstractTiffImageData getTiffRawImageData(ByteSource byteSource, TiffDirectory directory) throws ImagingException, java.io.IOException
- Throws:
ImagingExceptionjava.io.IOException
-
read
public void read(ByteSource byteSource, FormatCompliance formatCompliance, TiffReader.Listener listener) throws ImagingException, java.io.IOException
- Throws:
ImagingExceptionjava.io.IOException
-
readContents
public TiffContents readContents(ByteSource byteSource, TiffImagingParameters params, FormatCompliance formatCompliance) throws ImagingException, java.io.IOException
- Throws:
ImagingExceptionjava.io.IOException
-
readDirectories
public TiffContents readDirectories(ByteSource byteSource, boolean readImageData, FormatCompliance formatCompliance) throws ImagingException, java.io.IOException
- Throws:
ImagingExceptionjava.io.IOException
-
readDirectories
private void readDirectories(ByteSource byteSource, FormatCompliance formatCompliance, TiffReader.Listener listener) throws ImagingException, java.io.IOException
- Throws:
ImagingExceptionjava.io.IOException
-
readDirectory
private boolean readDirectory(ByteSource byteSource, long directoryOffset, int dirType, FormatCompliance formatCompliance, TiffReader.Listener listener, boolean ignoreNextDirectory, java.util.List<java.lang.Number> visited) throws ImagingException, java.io.IOException
- Throws:
ImagingExceptionjava.io.IOException
-
readDirectory
private boolean readDirectory(ByteSource byteSource, long offset, int dirType, FormatCompliance formatCompliance, TiffReader.Listener listener, java.util.List<java.lang.Number> visited) throws ImagingException, java.io.IOException
- Throws:
ImagingExceptionjava.io.IOException
-
readFirstDirectory
public TiffContents readFirstDirectory(ByteSource byteSource, boolean readImageData, FormatCompliance formatCompliance) throws ImagingException, java.io.IOException
- Throws:
ImagingExceptionjava.io.IOException
-
readTiffHeader
private TiffHeader readTiffHeader(ByteSource byteSource) throws ImagingException, java.io.IOException
- Throws:
ImagingExceptionjava.io.IOException
-
readTiffHeader
private TiffHeader readTiffHeader(java.io.InputStream is) throws ImagingException, java.io.IOException
- Throws:
ImagingExceptionjava.io.IOException
-
-