java.awt.image.Raster , java.awt.image.SampleModel
| Modifier and Type | Field and Description |
|---|---|
| protected int | banks
The number of banks in this DataBuffer. |
| protected int | dataType
The data type of this DataBuffer. |
| private static final int[] | dataTypeSize
Size of the data types indexed by DataType tags defined above. |
| protected int | offset
Offset into default (first) bank from which to get the first element. |
| protected int[] | offsets
Offsets into all banks. |
| protected int | size
Usable size of all banks. |
| pack-priv StateTrackableDelegate | |
| public static final int | TYPE_BYTE
Tag for unsigned byte data. |
| public static final int | TYPE_DOUBLE
Tag for double data. |
| public static final int | TYPE_FLOAT
Tag for float data. |
| public static final int | TYPE_INT
Tag for int data. |
| public static final int | TYPE_SHORT
Tag for signed short data. |
| public static final int | TYPE_UNDEFINED
Tag for undefined data. |
| public static final int | TYPE_USHORT
Tag for unsigned short data. |
| Access | Constructor and Description |
|---|---|
| protected | DataBuffer(int
the data type of this dataType, int DataBufferthe size of the banks size)Constructs a DataBuffer containing one bank of the specified data type and size. |
| pack-priv | DataBuffer(StateTrackable.
the initial initialState,State state of the datathe data type of this dataType, int DataBufferthe size of the banks size)Constructs a DataBuffer containing one bank of the specified
data type and size with the indicated initial |
| protected | DataBuffer(int
the data type of this dataType, int DataBufferthe size of the banks size, int the number of banks in this
numBanks)DataBufferConstructs a DataBuffer containing the specified number of banks. |
| pack-priv | DataBuffer(StateTrackable.
the initial initialState,State state of the datathe data type of this dataType, int DataBufferthe size of the banks size, int the number of banks in this
numBanks)DataBufferConstructs a DataBuffer containing the specified number of
banks with the indicated initial |
| protected | DataBuffer(int
the data type of this dataType, int DataBufferthe size of the banks size, int the number of banks in this
numBanks, int DataBufferthe offset for each bank offset)Constructs a DataBuffer that contains the specified number of banks. |
| pack-priv | DataBuffer(StateTrackable.
the initial initialState,State state of the datathe data type of this dataType, int DataBufferthe size of the banks size, int the number of banks in this
numBanks, int DataBufferthe offset for each bank offset)Constructs a DataBuffer that contains the specified number
of banks with the indicated initial |
| protected | DataBuffer(int
the data type of this dataType, int DataBufferthe size of the banks size, int the number of banks in this
numBanks, int[] DataBufferan array containing an offset for each bank. offsets)Constructs a DataBuffer which contains the specified number of banks. |
| pack-priv | DataBuffer(StateTrackable.
the initial initialState,State state of the datathe data type of this dataType, int DataBufferthe size of the banks size, int the number of banks in this
numBanks, int[] DataBufferan array containing an offset for each bank. offsets)Constructs a DataBuffer which contains the specified number
of banks with the indicated initial |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static void | |
| pack-priv static void | |
| pack-priv final void | |
| pack-priv static void | |
| pack-priv final void | |
| pack-priv final void | |
| pack-priv static void | |
| pack-priv static void | |
| pack-priv static void | |
| private static boolean | |
| public int | |
| public static int | Returns: the size of the data typethe value of one of the defined datatype tags type)Returns the size (in bits) of the data type, given a datatype tag. |
| public int | Returns: the data array element at the specified index.the index of the requested data array element i)Returns the requested data array element from the first (default) bank as an integer. |
| public abstract int | Returns: the data array element at the specified index from the specified bank at the specified index.the specified bank bank, int the index of the requested data array element i)Returns the requested data array element from the specified bank as an integer. |
| public double | Returns: a double value representing the element at the specified index in the data array.the specified index i)Returns the requested data array element from the first (default) bank as a double. |
| public double | Returns: a double value representing the element from the specified bank at the specified index in the data array.the specified bank bank, int the specified index i)Returns the requested data array element from the specified bank as a double. |
| public float | Returns: a float value representing the data array element at the specified index.the index of the requested data array element i)Returns the requested data array element from the first (default) bank as a float. |
| public float | Returns: a float value representing the data array element from the specified bank at the specified index.the specified bank bank, int the index of the requested data array element i)Returns the requested data array element from the specified bank as a float. |
| public int | |
| public int | Returns: the offset of the default bank.Returns the offset of the default bank in array elements. |
| public int[] | Returns: the offsets of all banks.Returns the offsets (in array elements) of all the banks. |
| public int | |
| public void | setElem(int
the specified index into the data array i, int the data to set the element at the specified index in
the data array val)Sets the requested data array element in the first (default) bank from the given integer. |
| public abstract void | setElem(int
the specified bank bank, int the specified index into the data array i, int the data to set the element in the specified bank
at the specified index in the data array val)Sets the requested data array element in the specified bank from the given integer. |
| public void | setElemDouble(int
the specified index i, double the value to set the element at the specified index
in the data array val)Sets the requested data array element in the first (default) bank from the given double. |
| public void | setElemDouble(int
the specified bank bank, int the specified index i, double the value to set the element in the specified bank
at the specified index of the data array val)Sets the requested data array element in the specified bank from the given double. |
| public void | setElemFloat(int
the specified index i, float the value to set the element at the specified index in
the data array val)Sets the requested data array element in the first (default) bank from the given float. |
| public void | setElemFloat(int
the specified bank bank, int the specified index i, float the value to set the element in the specified bank at
the specified index in the data array val)Sets the requested data array element in the specified bank from the given float. |
| pack-priv static int[] |
| banks | back to summary |
|---|---|
| protected int banks The number of banks in this DataBuffer. | |
| dataType | back to summary |
|---|---|
| protected int dataType The data type of this DataBuffer. | |
| dataTypeSize | back to summary |
|---|---|
| private static final int[] dataTypeSize Size of the data types indexed by DataType tags defined above. | |
| offset | back to summary |
|---|---|
| protected int offset Offset into default (first) bank from which to get the first element. | |
| offsets | back to summary |
|---|---|
| protected int[] offsets Offsets into all banks. | |
| size | back to summary |
|---|---|
| protected int size Usable size of all banks. | |
| theTrackable | back to summary |
|---|---|
| pack-priv StateTrackableDelegate theTrackable | |
| TYPE_BYTE | back to summary |
|---|---|
| public static final int TYPE_BYTE Tag for unsigned byte data. | |
| TYPE_DOUBLE | back to summary |
|---|---|
| public static final int TYPE_DOUBLE Tag for double data. | |
| TYPE_FLOAT | back to summary |
|---|---|
| public static final int TYPE_FLOAT Tag for float data. | |
| TYPE_INT | back to summary |
|---|---|
| public static final int TYPE_INT Tag for int data. | |
| TYPE_SHORT | back to summary |
|---|---|
| public static final int TYPE_SHORT Tag for signed short data. | |
| TYPE_UNDEFINED | back to summary |
|---|---|
| public static final int TYPE_UNDEFINED Tag for undefined data. | |
| TYPE_USHORT | back to summary |
|---|---|
| public static final int TYPE_USHORT Tag for unsigned short data. | |
| DataBuffer | back to summary |
|---|---|
| protected DataBuffer(int dataType, int size) Constructs a DataBuffer containing one bank of the specified data type and size.
| |
| DataBuffer | back to summary |
|---|---|
| pack-priv DataBuffer(StateTrackable. Constructs a DataBuffer containing one bank of the specified
data type and size with the indicated initial
| |
| DataBuffer | back to summary |
|---|---|
| protected DataBuffer(int dataType, int size, int numBanks) Constructs a DataBuffer containing the specified number of banks. Each bank has the specified size and an offset of 0.
| |
| DataBuffer | back to summary |
|---|---|
| pack-priv DataBuffer(StateTrackable. Constructs a DataBuffer containing the specified number of
banks with the indicated initial
| |
| DataBuffer | back to summary |
|---|---|
| protected DataBuffer(int dataType, int size, int numBanks, int offset) Constructs a DataBuffer that contains the specified number of banks. Each bank has the specified datatype, size and offset.
| |
| DataBuffer | back to summary |
|---|---|
| pack-priv DataBuffer(StateTrackable. Constructs a DataBuffer that contains the specified number
of banks with the indicated initial
| |
| DataBuffer | back to summary |
|---|---|
| protected DataBuffer(int dataType, int size, int numBanks, int[] offsets) Constructs a DataBuffer which contains the specified number of banks. Each bank has the specified datatype and size. The offset for each bank is specified by its respective entry in the offsets array.
| |
| DataBuffer | back to summary |
|---|---|
| pack-priv DataBuffer(StateTrackable. Constructs a DataBuffer which contains the specified number
of banks with the indicated initial
| |
| checkArraySize | back to summary |
|---|---|
| pack-priv static void checkArraySize(int size, int arrayLen) | |
| checkArraySize | back to summary |
|---|---|
| pack-priv static void checkArraySize(int size, int offset, int arrayLen) | |
| checkBank | back to summary |
|---|---|
| pack-priv final void checkBank(int bank) | |
| checkBankSize | back to summary |
|---|---|
| pack-priv static void checkBankSize(int bankIndex, int size, int offset, int arrayLen) | |
| checkIndex | back to summary |
|---|---|
| pack-priv final void checkIndex(int i) | |
| checkIndex | back to summary |
|---|---|
| pack-priv final void checkIndex(int bank, int i) | |
| checkNumBanks | back to summary |
|---|---|
| pack-priv static void checkNumBanks(int numBanks) | |
| checkOffset | back to summary |
|---|---|
| pack-priv static void checkOffset(int offset) | |
| checkSize | back to summary |
|---|---|
| pack-priv static void checkSize(int size) | |
| checkSizeAndOffset | back to summary |
|---|---|
| private static boolean checkSizeAndOffset(int size, int offset, int arrayLen) | |
| getDataType | back to summary |
|---|---|
| public int getDataType() Returns the data type of this DataBuffer.
| |
| getDataTypeSize | back to summary |
|---|---|
| public static int getDataTypeSize(int type) Returns the size (in bits) of the data type, given a datatype tag.
| |
| getElem | back to summary |
|---|---|
| public int getElem(int i) Returns the requested data array element from the first (default) bank as an integer.
| |
| getElem | back to summary |
|---|---|
| public abstract int getElem(int bank, int i) Returns the requested data array element from the specified bank as an integer.
| |
| getElemDouble | back to summary |
|---|---|
| public double getElemDouble(int i) Returns the requested data array element from the first (default) bank
as a double. The implementation in this class is to cast
| |
| getElemDouble | back to summary |
|---|---|
| public double getElemDouble(int bank, int i) Returns the requested data array element from the specified bank as a double. The implementation in this class is to cast getElem(bank, i) to a double. Subclasses may override this method if another implementation is needed.
| |
| getElemFloat | back to summary |
|---|---|
| public float getElemFloat(int i) Returns the requested data array element from the first (default) bank as a float. The implementation in this class is to cast getElem(i) to a float. Subclasses may override this method if another implementation is needed.
| |
| getElemFloat | back to summary |
|---|---|
| public float getElemFloat(int bank, int i) Returns the requested data array element from the specified bank
as a float. The implementation in this class is to cast
| |
| getNumBanks | back to summary |
|---|---|
| public int getNumBanks() Returns the number of banks in this DataBuffer.
| |
| getOffset | back to summary |
|---|---|
| public int getOffset() Returns the offset of the default bank in array elements.
| |
| getOffsets | back to summary |
|---|---|
| public int[] getOffsets() Returns the offsets (in array elements) of all the banks.
| |
| getSize | back to summary |
|---|---|
| public int getSize() Returns the size (in array elements) of all banks.
| |
| setElem | back to summary |
|---|---|
| public void setElem(int i, int val) Sets the requested data array element in the first (default) bank from the given integer.
| |
| setElem | back to summary |
|---|---|
| public abstract void setElem(int bank, int i, int val) Sets the requested data array element in the specified bank from the given integer.
| |
| setElemDouble | back to summary |
|---|---|
| public void setElemDouble(int i, double val) Sets the requested data array element in the first (default) bank
from the given double. The implementation in this class is to cast
val to an int and call
| |
| setElemDouble | back to summary |
|---|---|
| public void setElemDouble(int bank, int i, double val) Sets the requested data array element in the specified bank
from the given double. The implementation in this class is to cast
val to an int and call
| |
| setElemFloat | back to summary |
|---|---|
| public void setElemFloat(int i, float val) Sets the requested data array element in the first (default) bank
from the given float. The implementation in this class is to cast
val to an int and call
| |
| setElemFloat | back to summary |
|---|---|
| public void setElemFloat(int bank, int i, float val) Sets the requested data array element in the specified bank
from the given float. The implementation in this class is to cast
val to an int and call
| |
| toIntArray | back to summary |
|---|---|
| pack-priv static int[] toIntArray(Object obj) | |