java.awt.image
public final class DataBufferInt extends DataBuffer
int
primitives
to represent each of its banks.
Constructor Summary | |
---|---|
DataBufferInt(int size)
Creates a new data buffer with a single data bank containing the
specified number of int elements.
| |
DataBufferInt(int size, int numBanks)
Creates a new data buffer with the specified number of data banks,
each containing the specified number of int elements.
| |
DataBufferInt(int[] dataArray, int size)
Creates a new data buffer backed by the specified data bank.
| |
DataBufferInt(int[] dataArray, int size, int offset)
Creates a new data buffer backed by the specified data bank, with
the specified offset to the first element.
| |
DataBufferInt(int[][] dataArray, int size)
Creates a new data buffer backed by the specified data banks.
| |
DataBufferInt(int[][] dataArray, int size, int[] offsets)
Creates a new data buffer backed by the specified data banks, with
the specified offsets to the first element in each bank.
|
Method Summary | |
---|---|
int[][] | getBankData()
Returns the array underlying this DataBuffer .
|
int[] | getData()
Returns the first data bank.
|
int[] | getData(int bank)
Returns a data bank.
|
int | getElem(int i)
Returns an element from the first data bank. |
int | getElem(int bank, int i)
Returns an element from a particular data bank. |
void | setElem(int i, int val)
Sets an element in the first data bank. |
void | setElem(int bank, int i, int val)
Sets an element in a particular data bank. |
int
elements.
Parameters: size the number of elements in the data bank.
int
elements.
Parameters: size the number of elements in the data bank. numBanks the number of data banks.
Note: there is no exception when dataArray
is
null
, but in that case an exception will be thrown
later if you attempt to access the data buffer.
Parameters: dataArray the data bank. size the number of elements in the data bank.
Note: there is no exception when dataArray
is
null
, but in that case an exception will be thrown
later if you attempt to access the data buffer.
Parameters: dataArray the data bank. size the number of elements in the data bank. offset the offset to the first element in the array.
Parameters: dataArray the data banks. size the number of elements in the data bank.
Throws: NullPointerException if dataArray
is
null
.
Parameters: dataArray the data banks. size the number of elements in the data bank. offsets the offsets to the first element in each data bank.
Throws: NullPointerException if dataArray
is
null
.
DataBuffer
.
Returns: The data banks.
Returns: The first data bank.
Parameters: bank the bank index.
Returns: A data bank.
offset
is
added to the specified index before accessing the underlying data array.
Parameters: i the element index.
Returns: The element.
offset
is added to the specified index before accessing the underlying data
array.
Parameters: bank the bank index. i the element index.
Returns: The element.
i
before updating the underlying
data array.
Parameters: i the element index. val the new element value.
i
before updating the underlying
data array.
Parameters: bank the data bank index. i the element index. val the new element value.