aboutsummaryrefslogtreecommitdiffstats
path: root/src/junit/com/jogamp/common/util/BitstreamData.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-07-03 16:06:47 +0200
committerSven Gothel <[email protected]>2014-07-03 16:06:47 +0200
commitdf9ff7f340a5ab4e07efc613f5f264eeae63d4c7 (patch)
tree239ae276b82024b140428e6c0fe5d739fdd686a4 /src/junit/com/jogamp/common/util/BitstreamData.java
parenteb47aaba63e3b1bf55f274a0f338f1010a017ae4 (diff)
Code Clean-Up based on our Recommended Settings (jogamp-scripting c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74)
Code Clean-Up based on our Recommended Settings (jogamp-scripting c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74) - Change non static accesses to static members using declaring type - Change indirect accesses to static members to direct accesses (accesses through subtypes) - Add final modifier to private fields - Add final modifier to method parameters - Add final modifier to local variables - Remove unnecessary casts - Remove unnecessary '$NON-NLS$' tags - Remove trailing white spaces on all lines
Diffstat (limited to 'src/junit/com/jogamp/common/util/BitstreamData.java')
-rw-r--r--src/junit/com/jogamp/common/util/BitstreamData.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/junit/com/jogamp/common/util/BitstreamData.java b/src/junit/com/jogamp/common/util/BitstreamData.java
index a434053..a5a0bd9 100644
--- a/src/junit/com/jogamp/common/util/BitstreamData.java
+++ b/src/junit/com/jogamp/common/util/BitstreamData.java
@@ -59,7 +59,7 @@ public class BitstreamData {
public static final String[] testStringsLSB_revByte = new String[] { "01111011", "11110101", "01010011", "01111111" };
public static final String testStringLSB_revByte = testStringsLSB_revByte[0]+testStringsLSB_revByte[1]+testStringsLSB_revByte[2]+testStringsLSB_revByte[3];
- public static final void dumpData(String prefix, byte[] data, int offset, int len) {
+ public static final void dumpData(final String prefix, final byte[] data, final int offset, final int len) {
for(int i=0; i<len; ) {
System.err.printf("%s: %03d: ", prefix, i);
for(int j=0; j<8 && i<len; j++, i++) {
@@ -69,7 +69,7 @@ public class BitstreamData {
System.err.println("");
}
}
- public static final void dumpData(String prefix, ByteBuffer data, int offset, int len) {
+ public static final void dumpData(final String prefix, final ByteBuffer data, final int offset, final int len) {
for(int i=0; i<len; ) {
System.err.printf("%s: %03d: ", prefix, i);
for(int j=0; j<8 && i<len; j++, i++) {
@@ -80,14 +80,14 @@ public class BitstreamData {
}
}
- public static String toHexString(int v) {
+ public static String toHexString(final int v) {
return "0x"+Integer.toHexString(v);
}
- public static String toHexString(long v) {
+ public static String toHexString(final long v) {
return "0x"+Long.toHexString(v);
}
public static final String strZeroPadding= "0000000000000000000000000000000000000000000000000000000000000000"; // 64
- public static String toBinaryString(int v, int bitCount) {
+ public static String toBinaryString(final int v, final int bitCount) {
if( 0 == bitCount ) {
return "";
}
@@ -95,7 +95,7 @@ public class BitstreamData {
final String s0 = Integer.toBinaryString( mask & v );
return strZeroPadding.substring(0, bitCount-s0.length())+s0;
}
- public static String toBinaryString(long v, int bitCount) {
+ public static String toBinaryString(final long v, final int bitCount) {
if( 0 == bitCount ) {
return "";
}
@@ -103,15 +103,15 @@ public class BitstreamData {
final String s0 = Long.toBinaryString( mask & v );
return strZeroPadding.substring(0, bitCount-s0.length())+s0;
}
- public static String toHexBinaryString(long v, int bitCount) {
+ public static String toHexBinaryString(final long v, final int bitCount) {
final int nibbles = 0 == bitCount ? 2 : ( bitCount + 3 ) / 4;
return String.format("[%0"+nibbles+"X, %s]", v, toBinaryString(v, bitCount));
}
- public static String toHexBinaryString(int v, int bitCount) {
+ public static String toHexBinaryString(final int v, final int bitCount) {
final int nibbles = 0 == bitCount ? 2 : ( bitCount + 3 ) / 4;
return String.format("[%0"+nibbles+"X, %s]", v, toBinaryString(v, bitCount));
}
- public static String toHexBinaryString(short v, int bitCount) {
+ public static String toHexBinaryString(final short v, final int bitCount) {
final int nibbles = 0 == bitCount ? 2 : ( bitCount + 3 ) / 4;
return String.format("[%0"+nibbles+"X, %s]", v, toBinaryString(v, bitCount));
}