|
Java™ Platform Standard Ed. 6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.imageio.plugins.jpeg.JPEGHuffmanTable
public class JPEGHuffmanTable
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[] |
getLengths()
Return an array of short s containing the number of
values for each length in the Huffman table. |
short[] |
getValues()
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, wait, wait, wait |
Field Detail |
---|
public static final JPEGHuffmanTable StdDCLuminance
public static final JPEGHuffmanTable StdDCChrominance
public static final JPEGHuffmanTable StdACLuminance
public static final JPEGHuffmanTable StdACChrominance
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.
IllegalArgumentException
- if lengths
or
values
are null
, the length of
lengths
is greater than 16, the length of
values
is greater than 256, if any value in
lengths
or values
is less than zero,
or if the arrays do not describe a valid Huffman table.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
.getValues()
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.getLengths()
public String toString()
Object
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
toString
in class Object
|
Java™ Platform Standard Ed. 6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1993, 2010, Oracle and/or its affiliates. All rights reserved.