public final class ByteIO
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
INT4B_LEN
Datentyp-Laenge in Byte.
|
static int |
LONG5B_LEN
Datentyp-Laenge in Byte.
|
static int |
LONG6B_LEN
Datentyp-Laenge in Byte.
|
static int |
LONG8B_LEN
Datentyp-Laenge in Byte.
|
static byte[] |
SEPARATOR
Trennzeichenfolge zwischen Datensaetzen.
|
| Constructor and Description |
|---|
ByteIO() |
| Modifier and Type | Method and Description |
|---|---|
static int |
readSignedInt4Bytes(byte[] buf,
int pos)
Liest 4 Bytes im Byte-Array buf ab Stelle pos und liefert sie als Integer.
|
static long |
readSignedLong8Byte(byte[] buf,
int pos)
Liest 8 Bytes im Byte-Array buf ab Stelle pos und liefert sie als Long.
|
static long |
readUnsignedLong5Byte(byte[] buf,
int pos)
Liest 5 Bytes im Byte-Array buf ab Stelle pos und liefert sie als Long.
|
static long |
readUnsignedLong6Byte(byte[] buf,
int pos)
Liest 6 Bytes im Byte-Array buf ab Stelle pos und liefert sie als Long.
|
static int |
writeBytes(byte[] buf,
int pos,
byte[] b)
Schreibt das Quell-Byte-Array b in das Ziel-Byte-Array buf an die Stelle pos.
|
static int |
writeSeparator(byte[] buf,
int pos)
Schreibt den Seperator an die angegebene Stelle im uebergebenen Array.
|
static int |
writeSignedInt4Bytes(byte[] buf,
int pos,
int val)
Schreibt den Integer val in das Byte-Array buf an die Stelle pos.
|
static int |
writeSignedLong8Byte(byte[] buf,
int pos,
long val)
Schreibt den Long val in das Byte-Array buf an die Stelle pos.
|
static int |
writeUnsignedLong5Byte(byte[] buf,
int pos,
long val)
Schreibt die untersten 5 Byte des Long val in das Byte-Array buf an die Stelle pos.
|
static int |
writeUnsignedLong6Byte(byte[] buf,
int pos,
long val)
Schreibt die untersten 6 Byte des Long val in das Byte-Array buf an die Stelle pos.
|
public static final byte[] SEPARATOR
public static final int INT4B_LEN
public static final int LONG8B_LEN
public static final int LONG5B_LEN
public static final int LONG6B_LEN
public static int writeSeparator(byte[] buf,
int pos)
buf - Byte-Arraypos - Positionpublic static int writeSignedInt4Bytes(byte[] buf,
int pos,
int val)
buf - Byte-Arraypos - Positionval - Integer-Wertpublic static int writeSignedLong8Byte(byte[] buf,
int pos,
long val)
buf - Byte-Arraypos - Positionval - Long-Wert.public static int writeUnsignedLong5Byte(byte[] buf,
int pos,
long val)
buf - Byte-Arraypos - Positionval - Long-Wert, nur die untersten 5 Byte werden beruecksichtigtpublic static int writeUnsignedLong6Byte(byte[] buf,
int pos,
long val)
buf - Byte-Arraypos - Positionval - Long-Wert, nur die untersten 6 Byte werden beruecksichtigt (also auch nur positive Zahlen)public static int writeBytes(byte[] buf,
int pos,
byte[] b)
buf - Ziel-Byte-Arraypos - Positionb - Quell-Byte-Arraypublic static int readSignedInt4Bytes(byte[] buf,
int pos)
buf - Byte-Array.pos - Position.public static long readSignedLong8Byte(byte[] buf,
int pos)
buf - Byte-Arraypos - Positionpublic static long readUnsignedLong5Byte(byte[] buf,
int pos)
buf - Byte-Arraypos - Positionpublic static long readUnsignedLong6Byte(byte[] buf,
int pos)
buf - Byte-Arraypos - Position