Class HorizontalDeDifferencingStream
java.lang.Object
java.io.InputStream
com.twelvemonkeys.imageio.plugins.psd.HorizontalDeDifferencingStream
- All Implemented Interfaces:
Closeable, AutoCloseable
A decoder for data converted using "horizontal differencing predictor".
- Version:
- $Id: HorizontalDeDifferencingStream.java,v 1.0 11.03.13 14:20 haraldk Exp$
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate final ByteBufferprivate final ReadableByteChannelprivate final intTODO: Create shared version with TIFF, or see if we can avoid some duplication?private final int -
Constructor Summary
ConstructorsConstructorDescriptionHorizontalDeDifferencingStream(InputStream stream, int columns, int samplesPerPixel, int bitsPerSample, ByteOrder byteOrder) -
Method Summary
Methods inherited from class InputStream
available, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skipNBytes, transferTo
-
Field Details
-
columns
private final int columnsTODO: Create shared version with TIFF, or see if we can avoid some duplication? -
samplesPerPixel
private final int samplesPerPixel -
bitsPerSample
private final int bitsPerSample -
channel
-
buffer
-
-
Constructor Details
-
HorizontalDeDifferencingStream
public HorizontalDeDifferencingStream(InputStream stream, int columns, int samplesPerPixel, int bitsPerSample, ByteOrder byteOrder)
-
-
Method Details
-
isValidBPS
static boolean isValidBPS(int bitsPerSample) -
fetch
- Throws:
IOException
-
decodeRow
private void decodeRow() -
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
skip
- Overrides:
skipin classInputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-