public class BinaryResourceValue extends java.lang.Object implements SerializableResource
| Modifier and Type | Class and Description |
|---|---|
static class |
BinaryResourceValue.Type
Resource type codes.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
SIZE
The serialized size in bytes of a
BinaryResourceValue. |
| Modifier and Type | Method and Description |
|---|---|
static BinaryResourceValue |
create(java.nio.ByteBuffer buffer) |
int |
data()
The actual 4-byte value; interpretation of the value depends on
dataType. |
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
int |
size()
The length in bytes of this value.
|
byte[] |
toByteArray()
Converts this resource into an array of bytes representation.
|
byte[] |
toByteArray(boolean shrink)
Converts this resource into an array of bytes representation.
|
BinaryResourceValue.Type |
type()
The raw data type of this value.
|
public static final int SIZE
BinaryResourceValue.public static BinaryResourceValue create(java.nio.ByteBuffer buffer)
public int size()
public BinaryResourceValue.Type type()
public int data()
dataType.public byte[] toByteArray()
SerializableResourcetoByteArray in interface SerializableResourcepublic byte[] toByteArray(boolean shrink)
SerializableResourcetoByteArray in interface SerializableResourceshrink - True if, when converting to a byte array, this resource can modify the returned
bytes in an effort to reduce the size.public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object