public final class StringVectorAttribute extends TypedAttribute<List<String>>
TypedAttribute
subclass holding a List<String>
value.
This attribute is named after the one in the original C++ OpenEXR library
thus "vector" refers to its original implementation using
std::vector<std::string>
, it does not have anything to do
with java.util.Vector<E>
.
Attribute.AttributeCreator, Attribute.AttributeCreatorProvider
value
Constructor and Description |
---|
StringVectorAttribute() |
StringVectorAttribute(List<String> value) |
Modifier and Type | Method and Description |
---|---|
protected List<String> |
cloneValue()
Clones the value, required by
TypedAttribute.clone() . |
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.
|
protected void |
writeValueTo(XdrOutput output)
Writes the value of this attribute into the given output buffer.
|
checkedValueOf, checkSize, clone, equals, getValue, hashCode, readValueFrom, setValue, toString, valueOf, writeValueTo
public String typeName()
Attribute
public void readValueFrom(XdrInput input, int size, int version) throws EXRIOException
TypedAttribute
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.
The default implementation calls TypedAttribute.readValueFrom(XdrInput, int)
and checks that the actual bytes consumed from input
match those
specified by size
, throwing an EXRIOException
if that
is not the case.
readValueFrom
in interface Attribute
readValueFrom
in class TypedAttribute<List<String>>
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.protected void writeValueTo(XdrOutput output) throws EXRIOException
TypedAttribute
TypedAttribute.writeValueTo(XdrOutput, int)
.
The default implementation throws an
UnsupportedOperationException
.
writeValueTo
in class TypedAttribute<List<String>>
output
- data output into which the value will be written.EXRIOException
- if there is an I/O error.protected List<String> cloneValue()
TypedAttribute
TypedAttribute.clone()
. Most of the times
instances should create a deep copy of their value.cloneValue
in class TypedAttribute<List<String>>