Enum Constant and Description |
---|
CHAR |
FLOAT |
INT16 |
INT32 |
INT8 |
MISSING |
Modifier and Type | Method and Description |
---|---|
int |
getID()
The ID according to the BCF2 specification
|
int |
getMissingBytes()
The bytes (encoded as an int) that are used to represent a missing value
for this type in BCF2
|
java.lang.Object |
getMissingJavaValue()
Return the java object (aka null) that is used to represent a missing value for this
type in Java
|
int |
getSizeInBytes()
How many bytes are used to represent this type on disk?
|
boolean |
isIntegerType() |
boolean |
isMissingType() |
int |
read(java.io.InputStream in)
Read a value from in stream of this BCF2 type as an int [32 bit] collection of bits
For intX and char values this is just the int / byte value of the underlying data represented as a 32 bit int
For a char the result must be converted to a char by (char)(byte)(0x0F & value)
For doubles it's necessary to convert subsequently this value to a double via Double.bitsToDouble()
|
static BCF2Type |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static BCF2Type[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
boolean |
withinRange(long v)
Can we encode value v in this type, according to its declared range.
|
void |
write(int value,
java.io.OutputStream out) |
public static final BCF2Type MISSING
public static final BCF2Type INT8
public static final BCF2Type INT16
public static final BCF2Type INT32
public static final BCF2Type FLOAT
public static final BCF2Type CHAR
public static BCF2Type[] values()
for (BCF2Type c : BCF2Type.values()) System.out.println(c);
public static BCF2Type valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic int getSizeInBytes()
public int getID()
public final boolean withinRange(long v)
v
- public java.lang.Object getMissingJavaValue()
public int getMissingBytes()
public boolean isMissingType()
public boolean isIntegerType()
public int read(java.io.InputStream in) throws java.io.IOException
in
- java.io.IOException
public void write(int value, java.io.OutputStream out) throws java.io.IOException
java.io.IOException