Class HorizontalDifferencingStream
java.lang.Object
java.io.OutputStream
com.twelvemonkeys.imageio.plugins.tiff.HorizontalDifferencingStream
- All Implemented Interfaces:
Closeable
,Flushable
,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 int
private final ByteBuffer
private final WritableByteChannel
private final int
private final int
-
Constructor Summary
ConstructorsConstructorDescriptionHorizontalDifferencingStream
(OutputStream stream, int columns, int samplesPerPixel, int bitsPerSample, ByteOrder byteOrder) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
private void
void
flush()
private boolean
(package private) static boolean
isValidBPS
(int bitsPerSample) void
write
(byte[] b, int off, int len) void
write
(int b) Methods inherited from class java.io.OutputStream
nullOutputStream, write
-
Field Details
-
columns
private final int columns -
samplesPerPixel
private final int samplesPerPixel -
bitsPerSample
private final int bitsPerSample -
channel
-
buffer
-
-
Constructor Details
-
HorizontalDifferencingStream
public HorizontalDifferencingStream(OutputStream stream, int columns, int samplesPerPixel, int bitsPerSample, ByteOrder byteOrder)
-
-
Method Details
-
isValidBPS
static boolean isValidBPS(int bitsPerSample) -
flushBuffer
- Throws:
IOException
-
encodeRow
- Throws:
EOFException
-
write
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-