public interface Attribute extends Cloneable
Attributes provide a unique string identifying their concrete type via
typeName()
. They can create deep copies of themselves as specified
in the contract of Cloneable
. The functions
writeValueTo(XdrOutput, int)
and
readValueFrom(XdrInput, int, int)
implement the serialization
routines for writing and reading and attribute from the OpenEXR file header.
Modifier and Type | Interface and Description |
---|---|
static interface |
Attribute.AttributeCreator
Interface for objects which are registered with the attribute system
|
static interface |
Attribute.AttributeCreatorProvider
Interface for providers of attributes creators
|
Modifier and Type | Method and Description |
---|---|
Attribute |
clone()
Creates a deep-copy of this attribute.
|
void |
readValueFrom(XdrInput input,
int size,
int version)
Set the value of this attribute by reading from the given input buffer.
|
String |
typeName()
Get this attribute's type name as it appears in an OpenEXR header.
|
void |
writeValueTo(XdrOutput output,
int version)
Writes the value of this attribute into the given output buffer.
|
String typeName()
void readValueFrom(XdrInput input, int size, int version) throws EXRIOException
size
parameter contains the size in bytes specified in the
header for the attribute's value; version
is the 4-byte integer
following the magic number at the beginning of an OpenEXR file with the
file version and feature flags.input
- data input from which the value will be read.size
- amount of bytes to be read according to the header.version
- file version and flags as provided in the OpenEXR file.EXRIOException
- if there is an error in the file format or
an I/O error.void writeValueTo(XdrOutput output, int version) throws EXRIOException
version
parameter is the 4-byte integer following the
magic number at the beginning of an OpenEXR file with the
file version and feature flags.output
- data output into which the value will be written.version
- file version and flags as provided in the OpenEXR file.EXRIOException
- if there is an I/O error.Attribute clone()