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 class
TiffReader.Collector
private static class
TiffReader.FirstDirectoryCollector
static interface
TiffReader.Listener
-
Field Summary
Fields Modifier and Type Field Description private boolean
strict
-
Constructor Summary
Constructors Constructor Description TiffReader(boolean strict)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private JpegImageData
getJpegRawImageData(ByteSource byteSource, TiffDirectory directory)
private java.nio.ByteOrder
getTiffByteOrder(int byteOrderByte)
private TiffImageData
getTiffRawImageData(ByteSource byteSource, TiffDirectory directory)
void
read(ByteSource byteSource, java.util.Map<java.lang.String,java.lang.Object> params, FormatCompliance formatCompliance, TiffReader.Listener listener)
TiffContents
readContents(ByteSource byteSource, java.util.Map<java.lang.String,java.lang.Object> params, FormatCompliance formatCompliance)
TiffContents
readDirectories(ByteSource byteSource, boolean readImageData, FormatCompliance formatCompliance)
private void
readDirectories(ByteSource byteSource, FormatCompliance formatCompliance, TiffReader.Listener listener)
private boolean
readDirectory(ByteSource byteSource, long directoryOffset, int dirType, FormatCompliance formatCompliance, TiffReader.Listener listener, boolean ignoreNextDirectory, java.util.List<java.lang.Number> visited)
private boolean
readDirectory(ByteSource byteSource, long offset, int dirType, FormatCompliance formatCompliance, TiffReader.Listener listener, java.util.List<java.lang.Number> visited)
TiffContents
readFirstDirectory(ByteSource byteSource, java.util.Map<java.lang.String,java.lang.Object> params, boolean readImageData, FormatCompliance formatCompliance)
private TiffHeader
readTiffHeader(java.io.InputStream is)
private TiffHeader
readTiffHeader(ByteSource byteSource)
-
Methods inherited from class org.apache.commons.imaging.common.BinaryFileParser
debugNumber, debugNumber, getByteOrder, setByteOrder
-
-
-
-
Method Detail
-
readTiffHeader
private TiffHeader readTiffHeader(ByteSource byteSource) throws ImageReadException, java.io.IOException
- Throws:
ImageReadException
java.io.IOException
-
getTiffByteOrder
private java.nio.ByteOrder getTiffByteOrder(int byteOrderByte) throws ImageReadException
- Throws:
ImageReadException
-
readTiffHeader
private TiffHeader readTiffHeader(java.io.InputStream is) throws ImageReadException, java.io.IOException
- Throws:
ImageReadException
java.io.IOException
-
readDirectories
private void readDirectories(ByteSource byteSource, FormatCompliance formatCompliance, TiffReader.Listener listener) throws ImageReadException, java.io.IOException
- Throws:
ImageReadException
java.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 ImageReadException, java.io.IOException
- Throws:
ImageReadException
java.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 ImageReadException, java.io.IOException
- Throws:
ImageReadException
java.io.IOException
-
readFirstDirectory
public TiffContents readFirstDirectory(ByteSource byteSource, java.util.Map<java.lang.String,java.lang.Object> params, boolean readImageData, FormatCompliance formatCompliance) throws ImageReadException, java.io.IOException
- Throws:
ImageReadException
java.io.IOException
-
readDirectories
public TiffContents readDirectories(ByteSource byteSource, boolean readImageData, FormatCompliance formatCompliance) throws ImageReadException, java.io.IOException
- Throws:
ImageReadException
java.io.IOException
-
readContents
public TiffContents readContents(ByteSource byteSource, java.util.Map<java.lang.String,java.lang.Object> params, FormatCompliance formatCompliance) throws ImageReadException, java.io.IOException
- Throws:
ImageReadException
java.io.IOException
-
read
public void read(ByteSource byteSource, java.util.Map<java.lang.String,java.lang.Object> params, FormatCompliance formatCompliance, TiffReader.Listener listener) throws ImageReadException, java.io.IOException
- Throws:
ImageReadException
java.io.IOException
-
getTiffRawImageData
private TiffImageData getTiffRawImageData(ByteSource byteSource, TiffDirectory directory) throws ImageReadException, java.io.IOException
- Throws:
ImageReadException
java.io.IOException
-
getJpegRawImageData
private JpegImageData getJpegRawImageData(ByteSource byteSource, TiffDirectory directory) throws ImageReadException, java.io.IOException
- Throws:
ImageReadException
java.io.IOException
-
-