Class HorizontalDeDifferencingFloatingPointStream
java.lang.Object
java.io.InputStream
com.twelvemonkeys.imageio.plugins.tiff.HorizontalDeDifferencingFloatingPointStream
- All Implemented Interfaces:
Closeable, AutoCloseable
A decoder for data converted using "floating point horizontal differencing predictor".
- Version:
- $Id: HorizontalDeDifferencingStream.java,v 1.0 11.03.13 14:20 haraldk Exp$
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ByteBufferprivate final intprivate final ReadableByteChannelprivate final intprivate final byte[]private final int -
Constructor Summary
ConstructorsConstructorDescriptionHorizontalDeDifferencingFloatingPointStream(InputStream stream, int columns, int samplesPerPixel, int bitsPerSample, ByteOrder byteOrder) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()private voiddecodeDeltaBytes(byte[] bytes, int columns, int samplesPerPixel) private voiddecodeFloatingPointDelta(byte[] input, byte[] output, int columns, int channels, int bytesPerSample, ByteOrder order) private voidprivate booleanfetch()private static booleanisValidBPS(int bitsPerSample) intread()intread(byte[] b, int off, int len) longskip(long n) Methods inherited from class InputStream
available, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skipNBytes, transferTo
-
Field Details
-
columns
private final int columns -
samplesPerPixel
private final int samplesPerPixel -
bytesPerSample
private final int bytesPerSample -
channel
-
buffer
-
fpRow
private final byte[] fpRow
-
-
Constructor Details
-
HorizontalDeDifferencingFloatingPointStream
public HorizontalDeDifferencingFloatingPointStream(InputStream stream, int columns, int samplesPerPixel, int bitsPerSample, ByteOrder byteOrder)
-
-
Method Details
-
isValidBPS
private static boolean isValidBPS(int bitsPerSample) -
fetch
- Throws:
IOException
-
decodeDeltaBytes
private void decodeDeltaBytes(byte[] bytes, int columns, int samplesPerPixel) -
decodeFloatingPointDelta
private void decodeFloatingPointDelta(byte[] input, byte[] output, int columns, int channels, int bytesPerSample, ByteOrder order) -
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
-