public class CramInt
extends java.lang.Object
| Constructor and Description |
|---|
CramInt() |
| Modifier and Type | Method and Description |
|---|---|
static int |
int32(byte[] data)
Read unsigned little-endian 4 byte integer from an array of bytes.
|
static int |
int32(java.nio.ByteBuffer buffer)
Read unsigned little-endian 4 byte integer from an
ByteBuffer. |
static int |
int32(java.io.InputStream inputStream)
Read unsigned little-endian 4 byte integer from an
InputStream. |
static byte[] |
writeInt32(int value)
Write int value to
OutputStream encoded as CRAM int data type. |
static int |
writeInt32(int value,
java.io.OutputStream outputStream)
Write int value to
OutputStream encoded as CRAM int data type. |
public static int int32(java.io.InputStream inputStream)
throws java.io.IOException
InputStream.inputStream - input stream to read fromjava.io.IOException - as per java IO contractpublic static int int32(byte[] data)
data - input stream to read frompublic static int int32(java.nio.ByteBuffer buffer)
ByteBuffer.buffer - ByteBuffer to read frompublic static int writeInt32(int value,
java.io.OutputStream outputStream)
throws java.io.IOException
OutputStream encoded as CRAM int data type.value - value to be written outoutputStream - the output streamjava.io.IOException - as per java IO contractpublic static byte[] writeInt32(int value)
OutputStream encoded as CRAM int data type.value - value to be written out