< prev index next >
src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFLZWUtil.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -35,17 +35,17 @@
int srcIndex;
byte[] dstData;
int dstIndex = 0;
- byte stringTable[][];
+ byte[][] stringTable;
int tableIndex, bitsToGet = 9;
int nextData = 0;
int nextBits = 0;
- private static final int andTable[] = {
+ private static final int[] andTable = {
511,
1023,
2047,
4095
};
@@ -141,23 +141,23 @@
}
/**
* Write out the string just uncompressed.
*/
- public void writeString(byte string[]) {
+ public void writeString(byte[] string) {
ensureCapacity(string.length);
for (int i = 0; i < string.length; i++) {
dstData[dstIndex++] = string[i];
}
}
/**
* Add a new string to the string table.
*/
- public void addStringToTable(byte oldString[], byte newString) {
+ public void addStringToTable(byte[] oldString, byte newString) {
int length = oldString.length;
- byte string[] = new byte[length + 1];
+ byte[] string = new byte[length + 1];
System.arraycopy(oldString, 0, string, 0, length);
string[length] = newString;
// Add this new String to the table
stringTable[tableIndex++] = string;
@@ -172,11 +172,11 @@
}
/**
* Add a new string to the string table.
*/
- public void addStringToTable(byte string[]) {
+ public void addStringToTable(byte[] string) {
// Add this new String to the table
stringTable[tableIndex++] = string;
if (tableIndex == 511) {
bitsToGet = 10;
@@ -188,13 +188,13 @@
}
/**
* Append {@code newString} to the end of {@code oldString}.
*/
- public byte[] composeString(byte oldString[], byte newString) {
+ public byte[] composeString(byte[] oldString, byte newString) {
int length = oldString.length;
- byte string[] = new byte[length + 1];
+ byte[] string = new byte[length + 1];
System.arraycopy(oldString, 0, string, 0, length);
string[length] = newString;
return string;
}
< prev index next >