站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JDK 5 Documentation v1.2.2, Java 2 SDK 英文文档

JPEG API: Class JPEGHuffmanTable - JDK 5 Documentation v1.2.2, Java 2 SDK 英文文档

com.sun.image.codec.jpeg

com.sun.image.codec.jpeg
Class JPEGHuffmanTable

java.lang.Object
  |
  +--com.sun.image.codec.jpeg.JPEGHuffmanTable

public class JPEGHuffmanTable
extends Object

A class to encapsulate a JPEG Huffman table.

Note that the classes in the com.sun.image.codec.jpeg package are not part of the core Java APIs. They are a part of Sun's JDK and JRE distributions. Although other licensees may choose to distribute these classes, developers cannot depend on their availability in non-Sun implementations. We expect that equivalent functionality will eventually be available in a core API or standard extension.


Field Summary
static JPEGHuffmanTable StdACChrominance
          Standard Huffman table ( JPEG standard section K.3 )
static JPEGHuffmanTable StdACLuminance
          Standard Huffman table ( JPEG standard section K.3 )
static JPEGHuffmanTable StdDCChrominance
          Standard Huffman table ( JPEG standard section K.3 )
static JPEGHuffmanTable StdDCLuminance
          Standard Huffman table ( JPEG standard section K.3 )
 
Constructor Summary
JPEGHuffmanTable(short[] lengths, short[] symbols)
          Creates a Huffman Table and initializes it.
 
Method Summary
 short[] getLengths()
          Return a copy of the array containing the number of symbols for each length in the Huffman table.
 short[] getSymbols()
          Return an array containing the Huffman symbols arranged by increasing length.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

StdDCLuminance

public static final JPEGHuffmanTable StdDCLuminance
Standard Huffman table ( JPEG standard section K.3 )

StdDCChrominance

public static final JPEGHuffmanTable StdDCChrominance
Standard Huffman table ( JPEG standard section K.3 )

StdACLuminance

public static final JPEGHuffmanTable StdACLuminance
Standard Huffman table ( JPEG standard section K.3 )

StdACChrominance

public static final JPEGHuffmanTable StdACChrominance
Standard Huffman table ( JPEG standard section K.3 )
Constructor Detail

JPEGHuffmanTable

public JPEGHuffmanTable(short[] lengths,
                        short[] symbols)
Creates a Huffman Table and initializes it.
Parameters:
lengths - lengths[k] = # of symbols with codes of length k bits; lengths[0] is ignored
symbols - symbols in order of increasing code length
Throws:
IllegalArgumentException - - thrown if the length of the tables is greater that the allowed table lengths. Or if the described huffman table is invalid.
Method Detail

getLengths

public short[] getLengths()
Return a copy of the array containing the number of symbols for each length in the Huffman table.
Returns:
A short array where array[k] = # of symbols in the table of length k. array[0] is unused

getSymbols

public short[] getSymbols()
Return an array containing the Huffman symbols arranged by increasing length. To make use of this array you must refer the the lengths array.
Returns:
A short array of Huffman symbols

com.sun.image.codec.jpeg

Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.