| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public class JPEGHuffmanTable extends Object
A class encapsulating a single JPEG Huffman table. Fields are provided for the "standard" tables from taken from Annex K of the JPEG specification. These are the tables used as defaults. This class differs from the old unsupported com.sun.image.codec.jpeg.JPEGHuffmanTable in two ways:
getValues
method instead of a getSymbols
method.
For more information about the operation of the built-in JPEG plug-ins, see the JPEG metadata format specification and usage notes.
Field Summary | |
---|---|
static JPEGHuffmanTable |
StdACChrominance
The standard AC chrominance Huffman table. |
static JPEGHuffmanTable |
StdACLuminance
The standard AC luminance Huffman table. |
static JPEGHuffmanTable |
StdDCChrominance
The standard DC chrominance Huffman table. |
static JPEGHuffmanTable |
StdDCLuminance
The standard DC luminance Huffman table. |
Constructor Summary | |
---|---|
JPEGHuffmanTable(short[] lengths, short[] values) Creates a Huffman table and initializes it. |
Method Summary | |
---|---|
short[] |
Return an array of short s containing the number of
values for each length in the Huffman table.
|
short[] |
Return an array of short s containing the
values arranged by increasing length of their corresponding
codes.
|
String |
toString() Returns a string representation of the object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final JPEGHuffmanTable StdACChrominance
public static final JPEGHuffmanTable StdACLuminance
public static final JPEGHuffmanTable StdDCChrominance
public static final JPEGHuffmanTable StdDCLuminance
Constructor Detail |
---|
public JPEGHuffmanTable(short[] lengths, short[] values)
lengths
- an array of short
s where
lengths[k]
is equal to the number of values with
corresponding codes of length k + 1
bits.values
- an array of short
s containing the
values in order of increasing code length.Method Detail |
---|
public short[] getLengths()
short
s containing the number of
values for each length in the Huffman table. The returned
array is a copy.
short
array where array[k-1]
is equal to the number of values in the table of length
k
.public short[] getValues()
short
s containing the
values arranged by increasing length of their corresponding
codes. The interpretation of
the array is dependent on the values returned from
getLengths
. The returned array is a copy.
short
array of values.public String toString()
toString
in class Object
| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |