public abstract class DataBox extends Object implements Comparable
Modifier and Type | Class and Description |
---|---|
static class |
DataBox.Types
An enum with the current supported types.
|
Constructor and Description |
---|
DataBox() |
DataBox(boolean b) |
DataBox(byte[] buf) |
DataBox(float f) |
DataBox(int i) |
DataBox(String s,
int len) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Object obj) |
boolean |
getBool() |
byte[] |
getBytes()
Returns a byte array with the data contained by this DataBox.
|
float |
getFloat() |
int |
getInt() |
int |
getSize()
Returns the fixed size of this DataBox.
|
String |
getString() |
void |
setBool(boolean b) |
void |
setFloat(float f) |
void |
setInt(int i) |
void |
setString(String s,
int len) |
String |
toString() |
DataBox.Types |
type()
Returns the type of the DataBox.
|
public DataBox() throws DataBoxException
DataBoxException
public DataBox(boolean b) throws DataBoxException
DataBoxException
public DataBox(int i) throws DataBoxException
DataBoxException
public DataBox(float f) throws DataBoxException
DataBoxException
public DataBox(String s, int len) throws DataBoxException
DataBoxException
public DataBox(byte[] buf) throws DataBoxException
DataBoxException
public boolean getBool() throws DataBoxException
DataBoxException
public int getInt() throws DataBoxException
DataBoxException
public float getFloat() throws DataBoxException
DataBoxException
public String getString() throws DataBoxException
DataBoxException
public void setBool(boolean b) throws DataBoxException
DataBoxException
public void setInt(int i) throws DataBoxException
DataBoxException
public void setFloat(float f) throws DataBoxException
DataBoxException
public void setString(String s, int len) throws DataBoxException
DataBoxException
public DataBox.Types type() throws DataBoxException
DataBoxException
public byte[] getBytes() throws DataBoxException
DataBoxException
public int getSize() throws DataBoxException
DataBoxException
public int compareTo(Object obj) throws DataBoxException
compareTo
in interface Comparable
DataBoxException
public String toString() throws DataBoxException
toString
in class Object
DataBoxException
Copyright © 2017. All rights reserved.