public static class DOFBlob.Type extends DOFType
DOFType.Context, DOFType.Nullable, DOFType.Typedef| Constructor and Description |
|---|
Type(DOFPacket packet)
Construct a type from the data read from the wire.
|
Type(int fixedLength)
Construct a type that requires a fixed-length blob.
|
Type(int minLength,
int maxLength)
Construct a type that requires a variable-length blob with length between
minLength and maxLength.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object other)
Return whether two types are equal.
|
DOFValue |
getInstance(DOFPacket packet)
|
int |
getMaxLength()
Get the maximum length of the type.
|
int |
getMinLength()
Get the minimum length of the type.
|
int |
hashCode()
Return a hash code for the type.
|
void |
marshal(DOFType.Context context,
DOFPacket packet)
Marshal, or output a binary representation of this type, into the
specified packet.
|
java.lang.String |
toString()
Returns a description of the type.
|
asBoolean, asByte, asBytes, asDate, asDOFInterfaceID, asDOFObjectID, asDouble, asFloat, asInt, asLong, asShort, asString, asULong, getCharSet, getEncoding, getSubtypes, getTypeID, isCompatibleWith, isDefined, marshalpublic Type(int fixedLength)
new Type (length, length).fixedLength - The required length of the blob. Must not be negative.public Type(int minLength,
int maxLength)
minLength - The required minimum length of the blob. Must not be negative.maxLength - The required maximum length of the blob. Must be greater than or equal to minLength.public Type(DOFPacket packet) throws DOFMarshalException
packet - The source for the type.DOFMarshalException - Any exception caused during read.public void marshal(DOFType.Context context, DOFPacket packet) throws DOFMarshalException
DOFTypecontext - The context for this set of related types.packet - The packet to write the type to.DOFMarshalException - If the type is not supported.public java.lang.String toString()
DOFTypepublic DOFValue getInstance(DOFPacket packet) throws DOFMarshalException
DOFTypeDOFValue instance from a DOFPacket.
When called the current buffer location will point at the first byte of data associated with the
type. On completion, the buffer location must point at the first byte after the data, meaning the
first unread byte.getInstance in class DOFTypepacket - The buffer which contains the serialized form of the object. Must not be null.null if the type is nullable.DOFMarshalException - If there are errors in the data or the buffer. This is an exception to the rule that
non-RuntimeExceptions not be thrown from a constructor.public int getMaxLength()
DOFTypegetMaxLength in class DOFTypepublic int getMinLength()
DOFTypegetMinLength in class DOFTypepublic int hashCode()
DOFTypeDOFType.equals(java.lang.Object) returns true.public boolean equals(java.lang.Object other)
DOFType