one.world.data
Class BinaryData
java.lang.Object
|
+--one.world.core.Tuple
|
+--one.world.data.Data
|
+--one.world.data.BinaryData
- All Implemented Interfaces:
- Cloneable, Serializable
- Direct Known Subclasses:
- Chunk, ClassData
- public class BinaryData
- extends Data
Implementation of a binary data tuple. A binary data tuple holds an
arbitrary byte array.
- Version:
- $Revision: 1.8 $
- See Also:
- Serialized Form
|
Field Summary |
byte[] |
data
The actual data. |
|
Constructor Summary |
BinaryData()
Create a new, empty binary data tuple. |
BinaryData(Guid id,
String name,
String type,
byte[] data)
Create a new binary data tuple with the specified ID, name, type,
and data. |
BinaryData(String name,
String type,
byte[] data)
Create a new binary data tuple with the specified name, type, and
data. |
|
Method Summary |
String |
toString()
Get a string representation for this binary data tuple. |
void |
validate()
Validate this binary data tuple. |
| Methods inherited from class one.world.core.Tuple |
clone, containsNonSymbolicHandler, equals, fields, get, getMetaData, getType, hasField, hashCode, hasMetaData, remove, set, setMetaData, wrap |
data
public byte[] data
- The actual data.
BinaryData
public BinaryData()
- Create a new, empty binary data tuple.
BinaryData
public BinaryData(String name,
String type,
byte[] data)
- Create a new binary data tuple with the specified name, type, and
data.
- Parameters:
name - The name for the new binary data tuple.type - The MIME type for the new binary data tuple.data - The data for the new binary data tuple, which is
not copied.
BinaryData
public BinaryData(Guid id,
String name,
String type,
byte[] data)
- Create a new binary data tuple with the specified ID, name, type,
and data.
- Parameters:
id - The ID for the new binary data tuple.name - The name for the new binary data tuple.type - The MIME type for the new binary data tuple.data - The data for the new binary data tuple, which is
not copied.
validate
public void validate()
throws TupleException
- Validate this binary data tuple.
- Overrides:
validate in class Data
- Following copied from class:
one.world.core.Tuple
- Throws:
TupleException - Signals that the tuple is either malformed
(i.e., does not conform to the tuple
specification) or invalid (i.e., does not
conform to the semantic constraints of its
type).- See Also:
MalformedTupleException,
InvalidTupleException,
Type.validate(Class)
toString
public String toString()
- Get a string representation for this binary data tuple.
- Overrides:
toString in class Tuple
- Following copied from class:
one.world.core.Tuple
- Returns:
- A string representation for this tuple.
(C) Copyright 2001 UW CSE