summaryrefslogtreecommitdiffstats
path: root/src/java/jogamp/common/os/elf/IOUtils.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/jogamp/common/os/elf/IOUtils.java')
-rw-r--r--src/java/jogamp/common/os/elf/IOUtils.java10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/java/jogamp/common/os/elf/IOUtils.java b/src/java/jogamp/common/os/elf/IOUtils.java
index 62b47db..454a325 100644
--- a/src/java/jogamp/common/os/elf/IOUtils.java
+++ b/src/java/jogamp/common/os/elf/IOUtils.java
@@ -30,7 +30,6 @@ package jogamp.common.os.elf;
import java.io.IOException;
import java.io.RandomAccessFile;
-import com.jogamp.common.os.Platform;
import com.jogamp.common.util.Bitstream;
class IOUtils {
@@ -61,17 +60,12 @@ class IOUtils {
in.seek(newPos);
}
- static int readUInt32(final byte[] in, final int offset) {
- final int v = Bitstream.uint32LongToInt(Bitstream.readUInt32(!Platform.isLittleEndian(), in, offset));
+ static int readUInt32(final boolean isBigEndian, final byte[] in, final int offset) {
+ final int v = Bitstream.uint32LongToInt(Bitstream.readUInt32(isBigEndian, in, offset));
if( 0 > v ) {
throw new IllegalArgumentException("Read uint32 value "+toHexString(v)+" > int32-max "+toHexString(MAX_INT_VALUE));
}
return v;
- /** Need to fix endian for below path ..
- checkBounds(in, offset, 4);
- final byte[] uint = new byte[] { 0, 0, 0, 0, in[offset+0], in[offset+1], in[offset+2], in[offset+3] };
- final ByteBuffer b = ByteBuffer.wrap(uint, 0, 8).order(ByteOrder.nativeOrder());
- return b.asLongBuffer().get(0); */
}
/**