public class ByteChunk extends java.lang.Object implements IntegerValuedDataChunk
ByteChunk
class holds primitive byte data with optional
packing scheme and missing values.DataChunk.DataType
Constructor and Description |
---|
ByteChunk(byte[] byteData,
boolean isUnsigned,
java.lang.Byte missing,
PackingScheme scheme)
Creates a new initialized data chunk with scaling parameters.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(ChunkVisitor visitor)
Accepts a visitor in this chunk.
|
DataChunk |
blankCopy()
Creates a blank copy of this data chunk.
|
DataChunk |
blankCopyWithValues(int values)
Creates a blank copy of this data chunk with the specified number of
data values.
|
byte[] |
getByteData()
Gets the primitive array used to store data.
|
DataChunk.DataType |
getExternalType()
Gets the external data type that values in this chunk are meant
to represent.
|
java.lang.Byte |
getMissing()
Gets the missing value.
|
PackingScheme |
getPackingScheme()
Gets the packing scheme.
|
java.lang.Object |
getPrimitiveData()
Gets the primitive chunk data.
|
int |
getValues()
Gets the number of values held by this chunk.
|
boolean |
isUnsigned()
Gets the unsigned flag.
|
public ByteChunk(byte[] byteData, boolean isUnsigned, java.lang.Byte missing, PackingScheme scheme)
byteData
- the byte data values.isUnsigned
- the unsigned flag, true if the byte data values are
in the range [0..255] or false for [-128..127].missing
- the missing data value, or null for none.scheme
- the packing scheme, or null for no packing.public boolean isUnsigned()
IntegerValuedDataChunk
isUnsigned
in interface IntegerValuedDataChunk
public PackingScheme getPackingScheme()
IntegerValuedDataChunk
getPackingScheme
in interface IntegerValuedDataChunk
public DataChunk.DataType getExternalType()
DataChunk
getExternalType
in interface DataChunk
public void accept(ChunkVisitor visitor)
DataChunk
public int getValues()
DataChunk
public java.lang.Object getPrimitiveData()
DataChunk
getPrimitiveData
in interface DataChunk
public DataChunk blankCopy()
DataChunk
public DataChunk blankCopyWithValues(int values)
DataChunk
blankCopyWithValues
in interface DataChunk
values
- the number of data values in the new blank data chunk.public java.lang.Byte getMissing()
public byte[] getByteData()