Class HorizontalDifferencingStream
- java.lang.Object
-
- java.io.OutputStream
-
- com.twelvemonkeys.imageio.plugins.tiff.HorizontalDifferencingStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.io.Flushable
,java.lang.AutoCloseable
final class HorizontalDifferencingStream extends java.io.OutputStream
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
Fields Modifier and Type Field Description private int
bitsPerSample
private java.nio.ByteBuffer
buffer
private java.nio.channels.WritableByteChannel
channel
private int
columns
private int
samplesPerPixel
-
Constructor Summary
Constructors Constructor Description HorizontalDifferencingStream(java.io.OutputStream stream, int columns, int samplesPerPixel, int bitsPerSample, java.nio.ByteOrder byteOrder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
private void
encodeRow()
void
flush()
private boolean
flushBuffer()
(package private) static boolean
isValidBPS(int bitsPerSample)
void
write(byte[] b, int off, int len)
void
write(int b)
-
-
-
Method Detail
-
isValidBPS
static boolean isValidBPS(int bitsPerSample)
-
flushBuffer
private boolean flushBuffer() throws java.io.IOException
- Throws:
java.io.IOException
-
encodeRow
private void encodeRow() throws java.io.EOFException
- Throws:
java.io.EOFException
-
write
public void write(int b) throws java.io.IOException
- Specified by:
write
in classjava.io.OutputStream
- Throws:
java.io.IOException
-
write
public void write(byte[] b, int off, int len) throws java.io.IOException
- Overrides:
write
in classjava.io.OutputStream
- Throws:
java.io.IOException
-
flush
public void flush() throws java.io.IOException
- Specified by:
flush
in interfacejava.io.Flushable
- Overrides:
flush
in classjava.io.OutputStream
- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjava.io.OutputStream
- Throws:
java.io.IOException
-
-