Package org.esa.snap.core.datamodel
Class ProductData.ASCII
java.lang.Object
org.esa.snap.core.datamodel.ProductData
org.esa.snap.core.datamodel.ProductData.Byte
org.esa.snap.core.datamodel.ProductData.ASCII
- All Implemented Interfaces:
Cloneable
- Enclosing class:
ProductData
The
ProductData.ASCII
class is a ProductData.Byte
specialisation representing textual
values.
Internally, data is stored in an array of the type byte[]
.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.esa.snap.core.datamodel.ProductData
ProductData.ASCII, ProductData.Byte, ProductData.Double, ProductData.Float, ProductData.Int, ProductData.Long, ProductData.Short, ProductData.UByte, ProductData.UInt, ProductData.UShort, ProductData.UTC
-
Field Summary
Fields inherited from class org.esa.snap.core.datamodel.ProductData.Byte
_array
Fields inherited from class org.esa.snap.core.datamodel.ProductData
TYPE_ASCII, TYPE_FLOAT32, TYPE_FLOAT64, TYPE_INT16, TYPE_INT32, TYPE_INT64, TYPE_INT8, TYPE_UINT16, TYPE_UINT32, TYPE_UINT64, TYPE_UINT8, TYPE_UNDEFINED, TYPE_UTC, TYPESTRING_ASCII, TYPESTRING_FLOAT32, TYPESTRING_FLOAT64, TYPESTRING_INT16, TYPESTRING_INT32, TYPESTRING_INT64, TYPESTRING_INT8, TYPESTRING_UINT16, TYPESTRING_UINT32, TYPESTRING_UINT64, TYPESTRING_UINT8, TYPESTRING_UTC
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ProductData
Retuns a "deep" copy of this product data.Returns a textual representation of this value's value.getElemStringAt
(int index) Returns a textual representation of this product data.Returns this value's data type String.void
Sets the data of this value.Methods inherited from class org.esa.snap.core.datamodel.ProductData.Byte
clone, dispose, getArray, getElemDoubleAt, getElemFloatAt, getElemIntAt, getElemLongAt, getElems, getElemUIntAt, getNumElems, readFrom, setElemDoubleAt, setElemFloatAt, setElemIntAt, setElemLongAt, setElemUIntAt, writeTo
Methods inherited from class org.esa.snap.core.datamodel.ProductData
createInstance, createInstance, createInstance, createInstance, createInstance, createInstance, createInstance, createInstance, createInstance, createInstance, createUnsignedInstance, createUnsignedInstance, createUnsignedInstance, equalElems, equals, getElemBoolean, getElemBooleanAt, getElemDouble, getElemFloat, getElemInt, getElemLong, getElemSize, getElemSize, getElemUInt, getType, getType, getTypeString, hashCode, isFloatingPointType, isInt, isIntType, isScalar, isSigned, isUIntType, isUnsigned, readFrom, readFrom, readFrom, setElemBoolean, setElemBooleanAt, setElemDouble, setElemFloat, setElemInt, setElemLong, setElemString, setElemStringAt, setElemUInt, toString, writeTo, writeTo, writeTo
-
Constructor Details
-
ASCII
public ASCII(int length) Constructs a newASCII
value.- Parameters:
length
- the ASCII string length
-
ASCII
Constructs a newASCII
value.- Parameters:
data
- the ASCII string data
-
-
Method Details
-
getElemString
Returns a textual representation of this value's value. The text returned is a string created from the bytes array elements in this value interpreted as ASCII values.- Overrides:
getElemString
in classProductData
- Returns:
- a text representing this product data, never
null
-
setElems
Sets the data of this value. The data must be a string, an byte or an char array. Each has to have at least a length of one.- Overrides:
setElems
in classProductData.Byte
- Parameters:
data
- the data array- Throws:
IllegalArgumentException
- if data isnull
or it is not an array of the required type or does the array length is less than one.
-
getElemStringAt
Returns a textual representation of this product data. The text returned is a string cretaed from the bytes array elements in this value interpreted as ASCII values.- Overrides:
getElemStringAt
in classProductData.Byte
- Parameters:
index
- the value index, must be>=0
and<getNumDataElems()
- Returns:
- a text representing this product data, never
null
-
createDeepClone
Retuns a "deep" copy of this product data.- Overrides:
createDeepClone
in classProductData.Byte
- Returns:
- a copy of this product data
-
getTypeString
Returns this value's data type String.- Overrides:
getTypeString
in classProductData
-