public class DataIO
Various IO classes and utilities..
Modifier and Type | Field and Description |
---|---|
static long |
PACK_LONG_RESULT_MASK |
Modifier and Type | Method and Description |
---|---|
static java.lang.Object[] |
arrayDelete() |
static long[] |
arrayDelete() |
static java.lang.Object[] |
arrayPut() |
static long |
fillLowBits() |
static byte[] |
fromHexa()
Converts hexadecimal string into binary data
|
static int |
getInt() |
static long |
getLong() |
static long |
getSixLong() |
static int |
intHash() |
static long |
intToLong()
converts 4 int bytes to lowest 4 long bytes. Does not preserve negative flag
|
static int |
longHash() |
static long |
nextPowTwo() |
static int |
nextPowTwo() |
static void |
packInt()
Pack int into an output stream. It will occupy 1-5 bytes depending on value (lower values occupy smaller space)
|
static int |
packInt() |
static void |
packIntBigger()
Pack int into an output stream. It will occupy 1-5 bytes depending on value (lower values occupy smaller space) This method is same as
, but is optimized for values larger than 127. Usually it is recids. |
static void |
packLong()
Pack long into output. It will occupy 1-10 bytes depending on value (lower values occupy smaller space)
|
static void |
packLong()
Pack long into output. It will occupy 1-10 bytes depending on value (lower values occupy smaller space)
|
static int |
packLong() |
static int |
packLongSize()
Calculate how much bytes packed long consumes.
|
static void |
packRecid()
Pack RECID into output stream with 3 bit checksum. It will occupy 1-10 bytes depending on value (lower values occupy smaller space)
|
static long |
parity16Get() |
static long |
parity16Set() |
static long |
parity1Get() |
static int |
parity1Get() |
static long |
parity1Set() |
static int |
parity1Set() |
static long |
parity3Get() |
static long |
parity3Set() |
static long |
parity4Get() |
static long |
parity4Set() |
static void |
putInt() |
static void |
putLong() |
static void |
putLong() |
static void |
putSixLong() |
static void |
readFully() |
static void |
readFully() |
static long |
roundDown() |
static int |
roundDown() |
static long |
roundUp() |
static int |
roundUp() |
static int |
shift() |
static void |
skipFully() |
static java.lang.String |
toHexa()
Converts binary array into its hexadecimal representation.
|
static int |
unpackInt()
Unpack int value from the input stream.
|
static int |
unpackInt()
Unpack int value from the input stream.
|
static int |
unpackInt() |
static long |
unpackLong()
Unpack long value from the input stream.
|
static long |
unpackLong()
Unpack long value from the input stream.
|
static long |
unpackLong() |
static long |
unpackRecid()
Unpack RECID value from the input stream with 3 bit checksum.
|
static void |
writeFully() |
public static int unpackInt()
Unpack int value from the input stream.
IOException
public static long unpackLong()
Unpack long value from the input stream.
IOException
public static int unpackInt()
Unpack int value from the input stream.
IOException
public static long unpackLong()
Unpack long value from the input stream.
IOException
public static void packLong()
Pack long into output. It will occupy 1-10 bytes depending on value (lower values occupy smaller space)
IOException
public static void packLong()
Pack long into output. It will occupy 1-10 bytes depending on value (lower values occupy smaller space)
IOException
public static int packLongSize()
Calculate how much bytes packed long consumes.
public static long unpackRecid()
Unpack RECID value from the input stream with 3 bit checksum.
IOException
public static void packRecid()
Pack RECID into output stream with 3 bit checksum. It will occupy 1-10 bytes depending on value (lower values occupy smaller space)
IOException
public static void packInt()
Pack int into an output stream. It will occupy 1-5 bytes depending on value (lower values occupy smaller space)
IOException
public static void packIntBigger()
Pack int into an output stream. It will occupy 1-5 bytes depending on value (lower values occupy smaller space) This method is same as
, but is optimized for values larger than 127. Usually it is recids. DataIO.packInt
IOException
DataIO.packInt
public static int longHash()
public static int intHash()
public static int getInt()
public static void putInt()
public static long getLong()
public static void putLong()
public static void putLong()
public static int packInt()
public static int packLong()
public static int unpackInt()
public static long unpackLong()
public static long getSixLong()
public static void putSixLong()
public static long nextPowTwo()
public static int nextPowTwo()
public static void readFully()
public static void readFully()
public static void writeFully()
public static void skipFully()
public static long fillLowBits()
public static long parity1Set()
public static int parity1Set()
public static long parity1Get()
public static int parity1Get()
public static long parity3Set()
public static long parity3Get()
public static long parity4Set()
public static long parity4Get()
public static long parity16Set()
public static long parity16Get()
public static java.lang.String toHexa()
Converts binary array into its hexadecimal representation.
public static byte[] fromHexa()
Converts hexadecimal string into binary data
public static java.lang.Object[] arrayPut()
public static java.lang.Object[] arrayDelete()
public static long[] arrayDelete()
public static long intToLong()
converts 4 int bytes to lowest 4 long bytes. Does not preserve negative flag
public static long roundUp()
public static long roundDown()
public static int roundUp()
public static int roundDown()
public static int shift()