>>>>> "Tom" == Thomas Fitzsimmons <[EMAIL PROTECTED]> writes:

Tom> +  public static final JPEGQTable K1Luminance = new JPEGQTable(new int[]
Tom> +      {

For these it would be mildly better to have a private constructor
which doesn't copy the argument.

Tom> +    int[] tableCopy = new int[table.length];
Tom> +    System.arraycopy(table, 0, tableCopy, 0, table.length);
Tom> +    return tableCopy;

This is:  return (int[]) table.clone();

Tom> +  public JPEGQTable getScaledInstance(float scaleFactor,
Tom> +                                      boolean forceBaseline)
Tom> +  {
Tom> +    int[] scaledTable = getTable();

Somehow this should also be able to make a single copy of the table.
Right now it makes 2 -- one here and one in the constructor.

Tom

Reply via email to