public void setDecodeTables(
            JPEGQTable[] qTables,
            JPEGHuffmanTable[] DCHuffmanTables,
            JPEGHuffmanTable[] ACHuffmanTables
    ) {
        if (qTables == null || DCHuffmanTables == null || ACHuffmanTables == null) {
            throw new IllegalArgumentException(Messages.getString("imageio.43"));
        }
        if(DCHuffmanTables.length != ACHuffmanTables.length) {
            throw new IllegalArgumentException(Messages.getString("imageio.43"));
        }
        if (qTables.length > 4 || DCHuffmanTables.length > 4) {
            throw new IllegalArgumentException(Messages.getString("imageio.43"));
        }

        // Do the shallow copy, it should be enough
        this.qTables = qTables.clone();
        dcHuffmanTables = DCHuffmanTables.clone();
        acHuffmanTables = ACHuffmanTables.clone();
    }