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 intprivate final ByteBufferprivate final WritableByteChannelprivate final intprivate final int -
Constructor Summary
ConstructorsConstructorDescriptionHorizontalDifferencingStream(OutputStream stream, int columns, int samplesPerPixel, int bitsPerSample, ByteOrder byteOrder) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()private voidvoidflush()private boolean(package private) static booleanisValidBPS(int bitsPerSample) voidwrite(byte[] b, int off, int len) voidwrite(int b) Methods inherited from class 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:
writein classOutputStream- Throws:
IOException
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-