|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.esa.beam.framework.datamodel.ProductData
org.esa.beam.framework.datamodel.ProductData.Byte
public static class ProductData.Byte
The Byte class is a ProductData specialisation for signed 8-bit integer fields.
Internally, data is stored in an array of the type byte[].
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.esa.beam.framework.datamodel.ProductData |
|---|
ProductData.ASCII, ProductData.Byte, ProductData.Double, ProductData.Float, ProductData.Int, ProductData.Short, ProductData.UByte, ProductData.UInt, ProductData.UShort, ProductData.UTC |
| Field Summary | |
|---|---|
protected byte[] |
_array
The internal data array holding this value's data elements. |
| Fields inherited from class org.esa.beam.framework.datamodel.ProductData |
|---|
TYPE_ASCII, TYPE_FLOAT32, TYPE_FLOAT64, TYPE_INT16, TYPE_INT32, TYPE_INT8, TYPE_UINT16, TYPE_UINT32, TYPE_UINT8, TYPE_UNDEFINED, TYPE_UTC, TYPESTRING_ASCII, TYPESTRING_FLOAT32, TYPESTRING_FLOAT64, TYPESTRING_INT16, TYPESTRING_INT32, TYPESTRING_INT8, TYPESTRING_UINT16, TYPESTRING_UINT32, TYPESTRING_UINT8, TYPESTRING_UTC |
| Constructor Summary | |
|---|---|
|
ProductData.Byte(byte[] array)
Constructs a new signed byte value. |
protected |
ProductData.Byte(byte[] array,
boolean unsigned)
Constructs a new signed byte value. |
|
ProductData.Byte(int numElems)
Constructs a new signed byte value. |
protected |
ProductData.Byte(int numElems,
boolean unsigned)
Constructs a new signed byte value. |
| Method Summary | |
|---|---|
Object |
clone()
|
protected ProductData |
createDeepClone()
Retuns a "deep" copy of this product data. |
void |
dispose()
Releases all of the resources used by this object instance and all of its owned children. |
byte[] |
getArray()
Returns the internal data array holding this value's data elements. |
double |
getElemDoubleAt(int index)
Please refer to ProductData.getElemDoubleAt(int). |
float |
getElemFloatAt(int index)
Please refer to ProductData.getElemFloatAt(int). |
int |
getElemIntAt(int index)
Please refer to ProductData.getElemIntAt(int). |
Object |
getElems()
Gets the actual value value(s). |
String |
getElemStringAt(int index)
Please refer to ProductData.getElemStringAt(int). |
long |
getElemUIntAt(int index)
Please refer to ProductData.getElemUIntAt(int). |
int |
getNumElems()
Returns the number of data elements this value has. |
void |
readFrom(int startPos,
int numElems,
ImageInputStream source)
Please refer to ProductData.readFrom(int, int, ImageInputStream). |
void |
setElemDoubleAt(int index,
double value)
Please refer to ProductData.setElemDoubleAt(int, double). |
void |
setElemFloatAt(int index,
float value)
Please refer to ProductData.setElemFloatAt(int, float). |
void |
setElemIntAt(int index,
int value)
Please refer to ProductData.setElemIntAt(int, int). |
void |
setElems(Object data)
Sets the data of this value. |
void |
setElemUIntAt(int index,
long value)
Please refer to ProductData.setElemUIntAt(int, long). |
void |
writeTo(int sourceStartPos,
int numSourceElems,
ImageOutputStream destination)
Please refer to ProductData.writeTo(int, int, ImageOutputStream). |
| Methods inherited from class org.esa.beam.framework.datamodel.ProductData |
|---|
createInstance, createInstance, createInstance, createInstance, createInstance, createInstance, createInstance, createInstance, createInstance, createInstance, createUnsignedInstance, createUnsignedInstance, createUnsignedInstance, equalElems, equals, getElemBoolean, getElemBooleanAt, getElemDouble, getElemFloat, getElemInt, getElemSize, getElemSize, getElemString, getElemUInt, getType, getType, getTypeString, getTypeString, hashCode, isFloatingPointType, isInt, isIntType, isScalar, isSigned, isUIntType, isUnsigned, readFrom, readFrom, readFrom, setElemBoolean, setElemBooleanAt, setElemDouble, setElemFloat, setElemInt, setElemString, setElemStringAt, setElemUInt, toString, writeTo, writeTo, writeTo |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected byte[] _array
| Constructor Detail |
|---|
public ProductData.Byte(int numElems)
byte value.
numElems - the number of elements, must not be less than one
protected ProductData.Byte(int numElems,
boolean unsigned)
byte value.
numElems - the number of elements, must not be less than oneunsigned - if true an unsigned value type is constructedpublic ProductData.Byte(byte[] array)
byte value.
array - the elements
protected ProductData.Byte(byte[] array,
boolean unsigned)
byte value.
array - the elementsunsigned - if true an unsigned value type is constructed| Method Detail |
|---|
protected ProductData createDeepClone()
createDeepClone in class ProductDatapublic int getNumElems()
getNumElems in class ProductDatapublic int getElemIntAt(int index)
ProductData.getElemIntAt(int).
getElemIntAt in class ProductDataindex - the value index, must be >=0 and <getNumDataElems()public long getElemUIntAt(int index)
ProductData.getElemUIntAt(int).
getElemUIntAt in class ProductDataindex - the value index, must be >=0 and <getNumDataElems()public float getElemFloatAt(int index)
ProductData.getElemFloatAt(int).
getElemFloatAt in class ProductDataindex - the value index, must be >=0 and <getNumDataElems()public double getElemDoubleAt(int index)
ProductData.getElemDoubleAt(int).
getElemDoubleAt in class ProductDataindex - the value index, must be >=0 and <getNumDataElems()public String getElemStringAt(int index)
ProductData.getElemStringAt(int).
getElemStringAt in class ProductDataindex - the value index, must be >=0 and <getNumDataElems()
public void setElemIntAt(int index,
int value)
ProductData.setElemIntAt(int, int).
setElemIntAt in class ProductDataindex - the value index, must be >=0 and <getNumDataElems()value - the value to be set
public void setElemUIntAt(int index,
long value)
ProductData.setElemUIntAt(int, long).
setElemUIntAt in class ProductDataindex - the value index, must be >=0 and <getNumDataElems()value - the value to be set
public void setElemFloatAt(int index,
float value)
ProductData.setElemFloatAt(int, float).
setElemFloatAt in class ProductDataindex - the value index, must be >=0 and <getNumDataElems()value - the value to be set
public void setElemDoubleAt(int index,
double value)
ProductData.setElemDoubleAt(int, double).
setElemDoubleAt in class ProductDataindex - the value index, must be >=0 and <getNumDataElems()value - the value to be setpublic final byte[] getArray()
nullpublic Object getElems()
byte[].
getElems in class ProductDatabyte[], never nullpublic void setElems(Object data)
byte[] or
String[] and have a length that is equal to the value returned by the
getNumDataElems method.
setElems in class ProductDatadata - the data array
IllegalArgumentException - if data is null or it is not an array of the required type or
does not have the required array length.
public void readFrom(int startPos,
int numElems,
ImageInputStream source)
throws IOException
ProductData.readFrom(int, int, ImageInputStream).
readFrom in class ProductDatastartPos - the destination start position (zero-based)numElems - the number of elements to readsource - a seekable data input stream
IOException - if an I/O error occurs
public void writeTo(int sourceStartPos,
int numSourceElems,
ImageOutputStream destination)
throws IOException
ProductData.writeTo(int, int, ImageOutputStream).
writeTo in class ProductDatasourceStartPos - the source start position (zero-based)numSourceElems - the number of elements to be writtendestination - a seekable data output stream
IOException - if an I/O error occurspublic Object clone()
clone in class Objectpublic void dispose()
This method should be called only if it is for sure that this object instance will never be used again.
The results of referencing an instance of this class after a call to dispose() are undefined.
Overrides of this method should always call super.dispose(); after disposing this instance.
dispose in class ProductData
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||