src/share/classes/javax/imageio/plugins/jpeg/JPEGImageReadParam.java
Print this page
*** 132,144 ****
(ACHuffmanTables.length > 4) ||
(DCHuffmanTables.length != ACHuffmanTables.length)) {
throw new IllegalArgumentException
("Invalid JPEG table arrays");
}
! this.qTables = (JPEGQTable[])qTables.clone();
! this.DCHuffmanTables = (JPEGHuffmanTable[])DCHuffmanTables.clone();
! this.ACHuffmanTables = (JPEGHuffmanTable[])ACHuffmanTables.clone();
}
/**
* Removes any quantization and Huffman tables that are currently
* set.
--- 132,144 ----
(ACHuffmanTables.length > 4) ||
(DCHuffmanTables.length != ACHuffmanTables.length)) {
throw new IllegalArgumentException
("Invalid JPEG table arrays");
}
! this.qTables = qTables.clone();
! this.DCHuffmanTables = DCHuffmanTables.clone();
! this.ACHuffmanTables = ACHuffmanTables.clone();
}
/**
* Removes any quantization and Huffman tables that are currently
* set.
*** 160,170 ****
* <code>null</code>.
*
* @see #setDecodeTables
*/
public JPEGQTable[] getQTables() {
! return (qTables != null) ? (JPEGQTable[])qTables.clone() : null;
}
/**
* Returns a copy of the array of DC Huffman tables set on the
* most recent call to <code>setDecodeTables</code>, or
--- 160,170 ----
* <code>null</code>.
*
* @see #setDecodeTables
*/
public JPEGQTable[] getQTables() {
! return (qTables != null) ? qTables.clone() : null;
}
/**
* Returns a copy of the array of DC Huffman tables set on the
* most recent call to <code>setDecodeTables</code>, or
*** 175,185 ****
*
* @see #setDecodeTables
*/
public JPEGHuffmanTable[] getDCHuffmanTables() {
return (DCHuffmanTables != null)
! ? (JPEGHuffmanTable[])DCHuffmanTables.clone()
: null;
}
/**
* Returns a copy of the array of AC Huffman tables set on the
--- 175,185 ----
*
* @see #setDecodeTables
*/
public JPEGHuffmanTable[] getDCHuffmanTables() {
return (DCHuffmanTables != null)
! ? DCHuffmanTables.clone()
: null;
}
/**
* Returns a copy of the array of AC Huffman tables set on the
*** 191,199 ****
*
* @see #setDecodeTables
*/
public JPEGHuffmanTable[] getACHuffmanTables() {
return (ACHuffmanTables != null)
! ? (JPEGHuffmanTable[])ACHuffmanTables.clone()
: null;
}
}
--- 191,199 ----
*
* @see #setDecodeTables
*/
public JPEGHuffmanTable[] getACHuffmanTables() {
return (ACHuffmanTables != null)
! ? ACHuffmanTables.clone()
: null;
}
}