Top Fields Constructors Methods
jogamp.common.os.elf

pack-priv Class IOUtils

extends Object
Class Inheritance
Imports
java.io.IOException, .RandomAccessFile, com.jogamp.common.util.Bitstream

Field Summary

Modifier and TypeField and Description
pack-priv static final long

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv static String

Returns:

the parsed string
getString
(final byte[]
byte source buffer to parse
sb
,
final int
offset within byte source buffer to start parsing
offset
,
final int
remaining numbers of bytes to parse beginning w/ sb_off, which shall not exceed sb.length - offset.
remaining
,
final int[]
optional integer array holding offset post parsing
offset_post
)

pack-priv static int

Returns:

the number of parsed strings
getStringCount
(final byte[]
byte source buffer to parse
sb
,
final int
offset within byte source buffer to start parsing
offset
,
final int
remaining numbers of bytes to parse beginning w/ sb_off, which shall not exceed sb.length - offset.
remaining
)

public static String[]

Returns:

the parsed strings
getStrings
(final byte[]
byte source buffer to parse
sb
,
final int
offset within byte source buffer to start parsing
offset
,
final int
remaining numbers of bytes to parse beginning w/ sb_off, which shall not exceed sb.length - offset.
remaining
)

pack-priv static int
long2Int(final long v)

pack-priv static void
readBytes(final RandomAccessFile in, final byte[] out, final int offset, final int len)

pack-priv static int
readUInt32(final boolean isBigEndian, final byte[] in, final int offset)

pack-priv static void
seek(final RandomAccessFile in, final long newPos)

pack-priv static int
shortToInt(final short s)

pack-priv static String
toHexString(final int i)

pack-priv static String
toHexString(final long i)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

MAX_INT_VALUEback to summary
pack-priv static final long MAX_INT_VALUE

Constructor Detail

IOUtilsback to summary
pack-priv IOUtils()

Method Detail

getStringback to summary
pack-priv static String getString(final byte[] sb, final int offset, final int remaining, final int[] offset_post) throws IndexOutOfBoundsException
Parameters
sb:byte[]

byte source buffer to parse

offset:int

offset within byte source buffer to start parsing

remaining:int

remaining numbers of bytes to parse beginning w/ sb_off, which shall not exceed sb.length - offset.

offset_post:int[]

optional integer array holding offset post parsing

Returns:String

the parsed string

Exceptions
IndexOutOfBoundsException:
if offset + remaining > sb.length.
getStringCountback to summary
pack-priv static int getStringCount(final byte[] sb, final int offset, final int remaining) throws IndexOutOfBoundsException
Parameters
sb:byte[]

byte source buffer to parse

offset:int

offset within byte source buffer to start parsing

remaining:int

remaining numbers of bytes to parse beginning w/ sb_off, which shall not exceed sb.length - offset.

Returns:int

the number of parsed strings

Exceptions
IndexOutOfBoundsException:
if offset + remaining > sb.length.
getStringsback to summary
public static String[] getStrings(final byte[] sb, final int offset, final int remaining) throws IndexOutOfBoundsException
Parameters
sb:byte[]

byte source buffer to parse

offset:int

offset within byte source buffer to start parsing

remaining:int

remaining numbers of bytes to parse beginning w/ sb_off, which shall not exceed sb.length - offset.

Returns:String[]

the parsed strings

Exceptions
IndexOutOfBoundsException:
if offset + remaining > sb.length.
long2Intback to summary
pack-priv static int long2Int(final long v)
readBytesback to summary
pack-priv static void readBytes(final RandomAccessFile in, final byte[] out, final int offset, final int len) throws IOException, IllegalArgumentException
readUInt32back to summary
pack-priv static int readUInt32(final boolean isBigEndian, final byte[] in, final int offset)
seekback to summary
pack-priv static void seek(final RandomAccessFile in, final long newPos) throws IOException
shortToIntback to summary
pack-priv static int shortToInt(final short s)
toHexStringback to summary
pack-priv static String toHexString(final int i)
toHexStringback to summary
pack-priv static String toHexString(final long i)