public class ArrayIOUtils extends Object
| Constructor and Description |
|---|
ArrayIOUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int |
readInt(byte[] in,
int inOffset)
Reads an integer from a specific series of bytes starting the reading at
a specific offset in it.
|
static int |
readInt16(byte[] in,
int inOffset)
Reads a short integer from a specific series of bytes starting the
reading at a specific offset in it.
|
static short |
readShort(byte[] in,
int inOffset)
Reads a short integer from a specific series of bytes starting the
reading at a specific offset in it.
|
static void |
writeInt(int in,
byte[] out,
int outOffset)
Converts an integer to a series of bytes and writes the result into a
specific output array of bytes starting the writing at a specific offset
in it.
|
static void |
writeInt16(int in,
byte[] out,
int outOffset)
Converts a short integer to a series of bytes and writes the result into
a specific output array of bytes starting the writing at a specific
offset in it.
|
static void |
writeShort(short in,
byte[] out,
int outOffset)
Converts a short integer to a series of bytes and writes the result into
a specific output array of bytes starting the writing at a specific
offset in it.
|
public static int readInt(byte[] in,
int inOffset)
in - the series of bytes to read an integer frominOffset - the offset in in at which the reading of the
integer is to startpublic static int readInt16(byte[] in,
int inOffset)
readShort(byte[], int) is that the read short integer is an
int which has been formed by reading two bytes, not a
short.in - the series of bytes to read the short integer frominOffset - the offset in in at which the reading of the
short integer is to startpublic static short readShort(byte[] in,
int inOffset)
in - the series of bytes to read the short integer frominOffset - the offset in in at which the reading of the
short integer is to startpublic static void writeInt(int in,
byte[] out,
int outOffset)
in - the integer to be written out as a series of bytesout - the output to receive the conversion of the specified
integer to a series of bytesoutOffset - the offset in out at which the writing of the
result of the conversion is to be startedpublic static void writeInt16(int in,
byte[] out,
int outOffset)
writeShort(short, byte[], int)
is that the input is an int and just two bytes of it are
written.in - the short integer to be written out as a series of bytes
specified as an integer i.e. the value to be converted is contained in
only two of the four bytes made available by the integerout - the output to receive the conversion of the specified short
integer to a series of bytesoutOffset - the offset in out at which the writing of the
result of the conversion is to be startedpublic static void writeShort(short in,
byte[] out,
int outOffset)
in - the short integer to be written out as a series of bytes
specified as shortout - the output to receive the conversion of the specified short
integer to a series of bytesoutOffset - the offset in out at which the writing of
the result of the conversion is to be startedCopyright © 2022 jitsi.org. All rights reserved.