APIdia Launch Partner
Top Fields Constructors Methods
com.sun.imageio.plugins.tiff

pack-priv abstract Class TIFFFaxCompressor

extends TIFFCompressor
Class Inheritance
Known Direct Subclasses
com.sun.imageio.plugins.tiff.TIFFRLECompressor, com.sun.imageio.plugins.tiff.TIFFT4Compressor, com.sun.imageio.plugins.tiff.TIFFT6Compressor
Imports
javax.imageio.metadata.IIOMetadata, javax.imageio.plugins.tiff.BaselineTIFFTagSet, .TIFFField

Field Summary

Modifier and TypeField and Description
protected int
bits

Output bit buffer.

protected static final int
BLACK

The CCITT numerical definition of black.

protected static final byte[]
protected static final int[][]
horz

Black and white horizontal mode table.

protected static final int[]
horzMode

Horizontal mode table.

protected boolean
inverseFill

Whether bits are inserted in reverse order (TIFF FillOrder 2).

protected static final int[][]
makeupCodes

Black and white make-up code table.

protected static final int[]
makeupCodesBlack

Make-up codes for black runs.

protected static final int[]
makeupCodesWhite

Make-up codes for white runs.

protected int
ndex

Number of bits in the output bit buffer.

protected static final int[][]
pass

Black and white pass mode table.

protected static final int[]
passMode

Pass mode table.

protected static final int[][]
termCodes

Black and white terminating code table.

protected static final int[]
termCodesBlack

Terminating codes for black runs.

protected static final int[]
termCodesWhite

Terminating codes for white runs.

protected static final int[][]
vert

Black and white vertical mode table.

protected static final int[]
vertMode

Vertical mode table.

protected static final int
WHITE

The CCITT numerical definition of white.

Inherited from com.sun.imageio.plugins.tiff.TIFFCompressor:
compressionTagValuecompressionTypeisCompressionLosslessmetadatastreamwriter

Constructor Summary

AccessConstructor and Description
protected
TIFFFaxCompressor(String compressionType, int compressionTagValue, boolean isCompressionLossless)

Constructor.

Method Summary

Modifier and TypeMethod and Description
public int
add1DBits(byte[] buf, int where, int count, int color)

Get code for run and add to compressed bitstream.

public int
add2DBits(byte[] buf, int where, int[][] mode, int entry)

Place entry from mode table into compressed bitstream.

public int
addEOFB(byte[] buf, int where)

Add an End-of-Facsimile-Block (EOFB == 0x001001) to the compressed bitstream.

public int
addEOL(boolean is1DMode, boolean addFill, boolean add1, byte[] buf, int where)

Add an End-of-Line (EOL == 0x001) to the compressed bitstream with optional byte alignment.

public int
encode1D(byte[] data, int rowOffset, int colOffset, int rowLength, byte[] compData, int compOffset)

One-dimensionally encode a row of data using CCITT Huffman compression.

public void
initBitBuf()

Initialize bit buffer machinery.

public int
nextState(byte[] data, int base, int bitOffset, int maxOffset)

Return min of maxOffset or offset of first pixel different from pixel at bitOffset.

public void
setMetadata(IIOMetadata
the IIOMetadata object for the image being written.
metadata
)

Overrides com.sun.imageio.plugins.tiff.TIFFCompressor.setMetadata.

Sets the value of the metadata field.

Inherited from com.sun.imageio.plugins.tiff.TIFFCompressor:
encodegetCompressionTagValuegetCompressionTypegetMetadatagetStreamgetWriterisCompressionLosslesssetStreamsetWriter

Field Detail

bitsback to summary
protected int bits

Output bit buffer.

BLACKback to summary
protected static final int BLACK

The CCITT numerical definition of black.

byteTableback to summary
protected static final byte[] byteTable
horzback to summary
protected static final int[][] horz

Black and white horizontal mode table.

horzModeback to summary
protected static final int[] horzMode

Horizontal mode table.

inverseFillback to summary
protected boolean inverseFill

Whether bits are inserted in reverse order (TIFF FillOrder 2).

makeupCodesback to summary
protected static final int[][] makeupCodes

Black and white make-up code table.

makeupCodesBlackback to summary
protected static final int[] makeupCodesBlack

Make-up codes for black runs.

makeupCodesWhiteback to summary
protected static final int[] makeupCodesWhite

Make-up codes for white runs.

ndexback to summary
protected int ndex

Number of bits in the output bit buffer.

passback to summary
protected static final int[][] pass

Black and white pass mode table.

passModeback to summary
protected static final int[] passMode

Pass mode table.

termCodesback to summary
protected static final int[][] termCodes

Black and white terminating code table.

termCodesBlackback to summary
protected static final int[] termCodesBlack

Terminating codes for black runs.

termCodesWhiteback to summary
protected static final int[] termCodesWhite

Terminating codes for white runs.

vertback to summary
protected static final int[][] vert

Black and white vertical mode table.

vertModeback to summary
protected static final int[] vertMode

Vertical mode table.

WHITEback to summary
protected static final int WHITE

The CCITT numerical definition of white.

Constructor Detail

TIFFFaxCompressorback to summary
protected TIFFFaxCompressor(String compressionType, int compressionTagValue, boolean isCompressionLossless)

Constructor. The superclass constructor is merely invoked with the same parameters.

Method Detail

add1DBitsback to summary
public int add1DBits(byte[] buf, int where, int count, int color)

Get code for run and add to compressed bitstream.

add2DBitsback to summary
public int add2DBits(byte[] buf, int where, int[][] mode, int entry)

Place entry from mode table into compressed bitstream.

addEOFBback to summary
public int addEOFB(byte[] buf, int where)

Add an End-of-Facsimile-Block (EOFB == 0x001001) to the compressed bitstream.

addEOLback to summary
public int addEOL(boolean is1DMode, boolean addFill, boolean add1, byte[] buf, int where)

Add an End-of-Line (EOL == 0x001) to the compressed bitstream with optional byte alignment.

encode1Dback to summary
public int encode1D(byte[] data, int rowOffset, int colOffset, int rowLength, byte[] compData, int compOffset)

One-dimensionally encode a row of data using CCITT Huffman compression. The bit buffer should be initialized as required before invoking this method and should be flushed after the method returns. The fill order is always highest-order to lowest-order bit so the calling routine should handle bit inversion.

initBitBufback to summary
public void initBitBuf()

Initialize bit buffer machinery.

nextStateback to summary
public int nextState(byte[] data, int base, int bitOffset, int maxOffset)

Return min of maxOffset or offset of first pixel different from pixel at bitOffset.

setMetadataback to summary
public void setMetadata(IIOMetadata metadata)

Overrides com.sun.imageio.plugins.tiff.TIFFCompressor.setMetadata.

Sets the value of the metadata field.

The implementation in this class also sets local options from the FILL_ORDER field if it exists.

Parameters
metadata:IIOMetadata

the IIOMetadata object for the image being written.

Annotations
@Override
See Also
getMetadata()