Package com.bfo.box
Class DataBox
java.lang.Object
com.bfo.box.Box
com.bfo.box.DataBox
A general Box that stores its content as a byte array.
Subclasses of DataBox can always be serialized with
Box.getEncoded()
.
There is no "setData()" method - a subclass of the approriate type should be created.- Since:
- 5
-
Constructor Details
-
DataBox
public DataBox()Create a new uninitialized box, for loading. Don't call this constructor -
DataBox
Create a new DataBox- Parameters:
label
- the label, which must not be null
-
DataBox
Create a new DataBox initialized to the specified data- Parameters:
label
- the label, which must not be nulldata
- the data, which is not cloned
-
-
Method Details
-
data
public byte[] data()Return a copy of the byte data from this box. Subclasses should provided more semantically-appropriate methods to retrieve data.- Returns:
- data the data
-