java.awt.image
Class DataBuffer

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.awt.image.DataBuffer
Direct Known Subclasses:
DataBufferByte sample code for java.awt.image.DataBufferByte definition code for java.awt.image.DataBufferByte , DataBufferDouble sample code for java.awt.image.DataBufferDouble definition code for java.awt.image.DataBufferDouble , DataBufferFloat sample code for java.awt.image.DataBufferFloat definition code for java.awt.image.DataBufferFloat , DataBufferInt sample code for java.awt.image.DataBufferInt definition code for java.awt.image.DataBufferInt , DataBufferShort sample code for java.awt.image.DataBufferShort definition code for java.awt.image.DataBufferShort , DataBufferUShort sample code for java.awt.image.DataBufferUShort definition code for java.awt.image.DataBufferUShort

public abstract class DataBuffer
extends Object sample code for java.lang.Object definition code for java.lang.Object

This class exists to wrap one or more data arrays. Each data array in the DataBuffer is referred to as a bank. Accessor methods for getting and setting elements of the DataBuffer's banks exist with and without a bank specifier. The methods without a bank specifier use the default 0th bank. The DataBuffer can optionally take an offset per bank, so that data in an existing array can be used even if the interesting data doesn't start at array location zero. Getting or setting the 0th element of a bank, uses the (0+offset)th element of the array. The size field specifies how much of the data array is available for use. Size + offset for a given bank should never be greater than the length of the associated data array. The data type of a data buffer indicates the type of the data array(s) and may also indicate additional semantics, e.g. storing unsigned 8-bit data in elements of a byte array. The data type may be TYPE_UNDEFINED or one of the types defined below. Other types may be added in the future. Generally, an object of class DataBuffer will be cast down to one of its data type specific subclasses to access data type specific methods for improved performance. Currently, the Java 2D(tm) API image classes use TYPE_BYTE, TYPE_USHORT, TYPE_INT, TYPE_SHORT, TYPE_FLOAT, and TYPE_DOUBLE DataBuffers to store image data.

See Also:
Raster sample code for java.awt.image.Raster definition code for java.awt.image.Raster , SampleModel sample code for java.awt.image.SampleModel definition code for java.awt.image.SampleModel

Field Summary
protected  int banks sample code for java.awt.image.DataBuffer.banks definition code for java.awt.image.DataBuffer.banks
          The number of banks in this DataBuffer.
protected  int dataType sample code for java.awt.image.DataBuffer.dataType definition code for java.awt.image.DataBuffer.dataType
          The data type of this DataBuffer.
protected  int offset sample code for java.awt.image.DataBuffer.offset definition code for java.awt.image.DataBuffer.offset
          Offset into default (first) bank from which to get the first element.
protected  int[] offsets sample code for java.awt.image.DataBuffer.offsets definition code for java.awt.image.DataBuffer.offsets
          Offsets into all banks.
protected  int size sample code for java.awt.image.DataBuffer.size definition code for java.awt.image.DataBuffer.size
          Usable size of all banks.
static int TYPE_BYTE sample code for java.awt.image.DataBuffer.TYPE_BYTE definition code for java.awt.image.DataBuffer.TYPE_BYTE
          Tag for unsigned byte data.
static int TYPE_DOUBLE sample code for java.awt.image.DataBuffer.TYPE_DOUBLE definition code for java.awt.image.DataBuffer.TYPE_DOUBLE
          Tag for double data.
static int TYPE_FLOAT sample code for java.awt.image.DataBuffer.TYPE_FLOAT definition code for java.awt.image.DataBuffer.TYPE_FLOAT
          Tag for float data.
static int TYPE_INT sample code for java.awt.image.DataBuffer.TYPE_INT definition code for java.awt.image.DataBuffer.TYPE_INT
          Tag for int data.
static int TYPE_SHORT sample code for java.awt.image.DataBuffer.TYPE_SHORT definition code for java.awt.image.DataBuffer.TYPE_SHORT
          Tag for signed short data.
static int TYPE_UNDEFINED sample code for java.awt.image.DataBuffer.TYPE_UNDEFINED definition code for java.awt.image.DataBuffer.TYPE_UNDEFINED
          Tag for undefined data.
static int TYPE_USHORT sample code for java.awt.image.DataBuffer.TYPE_USHORT definition code for java.awt.image.DataBuffer.TYPE_USHORT
          Tag for unsigned short data.
 
Constructor Summary
protected DataBuffer sample code for java.awt.image.DataBuffer.DataBuffer(int, int) definition code for java.awt.image.DataBuffer.DataBuffer(int, int) (int dataType, int size)
          Constructs a DataBuffer containing one bank of the specified data type and size.
protected DataBuffer sample code for java.awt.image.DataBuffer.DataBuffer(int, int, int) definition code for java.awt.image.DataBuffer.DataBuffer(int, int, int) (int dataType, int size, int numBanks)
          Constructs a DataBuffer containing the specified number of banks.
protected DataBuffer sample code for java.awt.image.DataBuffer.DataBuffer(int, int, int, int) definition code for java.awt.image.DataBuffer.DataBuffer(int, int, int, int) (int dataType, int size, int numBanks, int offset)
          Constructs a DataBuffer that contains the specified number of banks.
protected DataBuffer sample code for java.awt.image.DataBuffer.DataBuffer(int, int, int, int[]) definition code for java.awt.image.DataBuffer.DataBuffer(int, int, int, int[]) (int dataType, int size, int numBanks, int[] offsets)
          Constructs a DataBuffer which contains the specified number of banks.
 
Method Summary
 int getDataType sample code for java.awt.image.DataBuffer.getDataType() definition code for java.awt.image.DataBuffer.getDataType() ()
          Returns the data type of this DataBuffer.
static int getDataTypeSize sample code for java.awt.image.DataBuffer.getDataTypeSize(int) definition code for java.awt.image.DataBuffer.getDataTypeSize(int) (int type)
          Returns the size (in bits) of the data type, given a datatype tag.
 int getElem sample code for java.awt.image.DataBuffer.getElem(int) definition code for java.awt.image.DataBuffer.getElem(int) (int i)
          Returns the requested data array element from the first (default) bank as an integer.
abstract  int getElem sample code for java.awt.image.DataBuffer.getElem(int, int) definition code for java.awt.image.DataBuffer.getElem(int, int) (int bank, int i)
          Returns the requested data array element from the specified bank as an integer.
 double getElemDouble sample code for java.awt.image.DataBuffer.getElemDouble(int) definition code for java.awt.image.DataBuffer.getElemDouble(int) (int i)
          Returns the requested data array element from the first (default) bank as a double.
 double getElemDouble sample code for java.awt.image.DataBuffer.getElemDouble(int, int) definition code for java.awt.image.DataBuffer.getElemDouble(int, int) (int bank, int i)
          Returns the requested data array element from the specified bank as a double.
 float getElemFloat sample code for java.awt.image.DataBuffer.getElemFloat(int) definition code for java.awt.image.DataBuffer.getElemFloat(int) (int i)
          Returns the requested data array element from the first (default) bank as a float.
 float getElemFloat sample code for java.awt.image.DataBuffer.getElemFloat(int, int) definition code for java.awt.image.DataBuffer.getElemFloat(int, int) (int bank, int i)
          Returns the requested data array element from the specified bank as a float.
 int getNumBanks sample code for java.awt.image.DataBuffer.getNumBanks() definition code for java.awt.image.DataBuffer.getNumBanks() ()
          Returns the number of banks in this DataBuffer.
 int getOffset sample code for java.awt.image.DataBuffer.getOffset() definition code for java.awt.image.DataBuffer.getOffset() ()
          Returns the offset of the default bank in array elements.
 int[] getOffsets sample code for java.awt.image.DataBuffer.getOffsets() definition code for java.awt.image.DataBuffer.getOffsets() ()
          Returns the offsets (in array elements) of all the banks.
 int getSize sample code for java.awt.image.DataBuffer.getSize() definition code for java.awt.image.DataBuffer.getSize() ()
          Returns the size (in array elements) of all banks.
 void setElem sample code for java.awt.image.DataBuffer.setElem(int, int) definition code for java.awt.image.DataBuffer.setElem(int, int) (int i, int val)
          Sets the requested data array element in the first (default) bank from the given integer.
abstract  void setElem sample code for java.awt.image.DataBuffer.setElem(int, int, int) definition code for java.awt.image.DataBuffer.setElem(int, int, int) (int bank, int i, int val)
          Sets the requested data array element in the specified bank from the given integer.
 void setElemDouble sample code for java.awt.image.DataBuffer.setElemDouble(int, double) definition code for java.awt.image.DataBuffer.setElemDouble(int, double) (int i, double val)
          Sets the requested data array element in the first (default) bank from the given double.
 void setElemDouble sample code for java.awt.image.DataBuffer.setElemDouble(int, int, double) definition code for java.awt.image.DataBuffer.setElemDouble(int, int, double) (int bank, int i, double val)
          Sets the requested data array element in the specified bank from the given double.
 void setElemFloat sample code for java.awt.image.DataBuffer.setElemFloat(int, float) definition code for java.awt.image.DataBuffer.setElemFloat(int, float) (int i, float val)
          Sets the requested data array element in the first (default) bank from the given float.
 void setElemFloat sample code for java.awt.image.DataBuffer.setElemFloat(int, int, float) definition code for java.awt.image.DataBuffer.setElemFloat(int, int, float) (int bank, int i, float val)
          Sets the requested data array element in the specified bank from the given float.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

TYPE_BYTE sample code for java.awt.image.DataBuffer.TYPE_BYTE

public static final int TYPE_BYTE
Tag for unsigned byte data.

See Also:
Constant Field Values

TYPE_USHORT sample code for java.awt.image.DataBuffer.TYPE_USHORT

public static final int TYPE_USHORT
Tag for unsigned short data.

See Also:
Constant Field Values

TYPE_SHORT sample code for java.awt.image.DataBuffer.TYPE_SHORT

public static final int TYPE_SHORT
Tag for signed short data. Placeholder for future use.

See Also:
Constant Field Values

TYPE_INT sample code for java.awt.image.DataBuffer.TYPE_INT

public static final int TYPE_INT
Tag for int data.

See Also:
Constant Field Values

TYPE_FLOAT sample code for java.awt.image.DataBuffer.TYPE_FLOAT

public static final int TYPE_FLOAT
Tag for float data. Placeholder for future use.

See Also:
Constant Field Values

TYPE_DOUBLE sample code for java.awt.image.DataBuffer.TYPE_DOUBLE

public static final int TYPE_DOUBLE
Tag for double data. Placeholder for future use.

See Also:
Constant Field Values

TYPE_UNDEFINED sample code for java.awt.image.DataBuffer.TYPE_UNDEFINED

public static final int TYPE_UNDEFINED
Tag for undefined data.

See Also:
Constant Field Values

dataType sample code for java.awt.image.DataBuffer.dataType

protected int dataType
The data type of this DataBuffer.


banks sample code for java.awt.image.DataBuffer.banks

protected int banks
The number of banks in this DataBuffer.


offset sample code for java.awt.image.DataBuffer.offset

protected int offset
Offset into default (first) bank from which to get the first element.


size sample code for java.awt.image.DataBuffer.size

protected int size
Usable size of all banks.


offsets sample code for java.awt.image.DataBuffer.offsets

protected int[] offsets
Offsets into all banks.

Constructor Detail

DataBuffer sample code for java.awt.image.DataBuffer(int, int) definition code for java.awt.image.DataBuffer(int, int)

protected DataBuffer(int dataType,
                     int size)
Constructs a DataBuffer containing one bank of the specified data type and size.

Parameters:
dataType - the data type of this DataBuffer
size - the size of the banks

DataBuffer sample code for java.awt.image.DataBuffer(int, int, int) definition code for java.awt.image.DataBuffer(int, int, int)

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.

Parameters:
dataType - the data type of this DataBuffer
size - the size of the banks
numBanks - the number of banks in this DataBuffer

DataBuffer sample code for java.awt.image.DataBuffer(int, int, int, int) definition code for java.awt.image.DataBuffer(int, int, int, int)

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.

Parameters:
dataType - the data type of this DataBuffer
size - the size of the banks
numBanks - the number of banks in this DataBuffer
offset - the offset for each bank

DataBuffer sample code for java.awt.image.DataBuffer(int, int, int, int[]) definition code for java.awt.image.DataBuffer(int, int, int, int[])

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.

Parameters:
dataType - the data type of this DataBuffer
size - the size of the banks
numBanks - the number of banks in this DataBuffer
offsets - an array containing an offset for each bank.
Throws:
ArrayIndexOutOfBoundsException sample code for java.lang.ArrayIndexOutOfBoundsException definition code for java.lang.ArrayIndexOutOfBoundsException - if numBanks does not equal the length of offsets
Method Detail

getDataTypeSize sample code for java.awt.image.DataBuffer.getDataTypeSize(int) definition code for java.awt.image.DataBuffer.getDataTypeSize(int)

public static int getDataTypeSize(int type)
Returns the size (in bits) of the data type, given a datatype tag.

Parameters:
type - the value of one of the defined datatype tags
Returns:
the size of the data type
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if type is less than zero or greater than TYPE_DOUBLE sample code for java.awt.image.DataBuffer.TYPE_DOUBLE definition code for java.awt.image.DataBuffer.TYPE_DOUBLE

getDataType sample code for java.awt.image.DataBuffer.getDataType() definition code for java.awt.image.DataBuffer.getDataType()

public int getDataType()
Returns the data type of this DataBuffer.

Returns:
the data type of this DataBuffer.

getSize sample code for java.awt.image.DataBuffer.getSize() definition code for java.awt.image.DataBuffer.getSize()

public int getSize()
Returns the size (in array elements) of all banks.

Returns:
the size of all banks.

getOffset sample code for java.awt.image.DataBuffer.getOffset() definition code for java.awt.image.DataBuffer.getOffset()

public int getOffset()
Returns the offset of the default bank in array elements.

Returns:
the offset of the default bank.

getOffsets sample code for java.awt.image.DataBuffer.getOffsets() definition code for java.awt.image.DataBuffer.getOffsets()

public int[] getOffsets()
Returns the offsets (in array elements) of all the banks.

Returns:
the offsets of all banks.

getNumBanks sample code for java.awt.image.DataBuffer.getNumBanks() definition code for java.awt.image.DataBuffer.getNumBanks()

public int getNumBanks()
Returns the number of banks in this DataBuffer.

Returns:
the number of banks.

getElem sample code for java.awt.image.DataBuffer.getElem(int) definition code for java.awt.image.DataBuffer.getElem(int)

public int getElem(int i)
Returns the requested data array element from the first (default) bank as an integer.

Parameters:
i - the index of the requested data array element
Returns:
the data array element at the specified index.
See Also:
setElem(int, int) sample code for java.awt.image.DataBuffer.setElem(int, int) definition code for java.awt.image.DataBuffer.setElem(int, int) , setElem(int, int, int) sample code for java.awt.image.DataBuffer.setElem(int, int, int) definition code for java.awt.image.DataBuffer.setElem(int, int, int)

getElem sample code for java.awt.image.DataBuffer.getElem(int, int) definition code for java.awt.image.DataBuffer.getElem(int, int)

public abstract int getElem(int bank,
                            int i)
Returns the requested data array element from the specified bank as an integer.

Parameters:
bank - the specified bank
i - the index of the requested data array element
Returns:
the data array element at the specified index from the specified bank at the specified index.
See Also:
setElem(int, int) sample code for java.awt.image.DataBuffer.setElem(int, int) definition code for java.awt.image.DataBuffer.setElem(int, int) , setElem(int, int, int) sample code for java.awt.image.DataBuffer.setElem(int, int, int) definition code for java.awt.image.DataBuffer.setElem(int, int, int)

setElem sample code for java.awt.image.DataBuffer.setElem(int, int) definition code for java.awt.image.DataBuffer.setElem(int, int)

public void setElem(int i,
                    int val)
Sets the requested data array element in the first (default) bank from the given integer.

Parameters:
i - the specified index into the data array
val - the data to set the element at the specified index in the data array
See Also:
getElem(int) sample code for java.awt.image.DataBuffer.getElem(int) definition code for java.awt.image.DataBuffer.getElem(int) , getElem(int, int) sample code for java.awt.image.DataBuffer.getElem(int, int) definition code for java.awt.image.DataBuffer.getElem(int, int)

setElem sample code for java.awt.image.DataBuffer.setElem(int, int, int) definition code for java.awt.image.DataBuffer.setElem(int, int, int)

public abstract void setElem(int bank,
                             int i,
                             int val)
Sets the requested data array element in the specified bank from the given integer.

Parameters:
bank - the specified bank
i - the specified index into the data array
val - the data to set the element in the specified bank at the specified index in the data array
See Also:
getElem(int) sample code for java.awt.image.DataBuffer.getElem(int) definition code for java.awt.image.DataBuffer.getElem(int) , getElem(int, int) sample code for java.awt.image.DataBuffer.getElem(int, int) definition code for java.awt.image.DataBuffer.getElem(int, int)

getElemFloat sample code for java.awt.image.DataBuffer.getElemFloat(int) definition code for java.awt.image.DataBuffer.getElemFloat(int)

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.

Parameters:
i - the index of the requested data array element
Returns:
a float value representing the data array element at the specified index.
See Also:
setElemFloat(int, float) sample code for java.awt.image.DataBuffer.setElemFloat(int, float) definition code for java.awt.image.DataBuffer.setElemFloat(int, float) , setElemFloat(int, int, float) sample code for java.awt.image.DataBuffer.setElemFloat(int, int, float) definition code for java.awt.image.DataBuffer.setElemFloat(int, int, float)

getElemFloat sample code for java.awt.image.DataBuffer.getElemFloat(int, int) definition code for java.awt.image.DataBuffer.getElemFloat(int, int)

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 getElem(int, int) sample code for java.awt.image.DataBuffer.getElem(int, int) definition code for java.awt.image.DataBuffer.getElem(int, int) to a float. Subclasses can override this method if another implementation is needed.

Parameters:
bank - the specified bank
i - the index of the requested data array element
Returns:
a float value representing the data array element from the specified bank at the specified index.
See Also:
setElemFloat(int, float) sample code for java.awt.image.DataBuffer.setElemFloat(int, float) definition code for java.awt.image.DataBuffer.setElemFloat(int, float) , setElemFloat(int, int, float) sample code for java.awt.image.DataBuffer.setElemFloat(int, int, float) definition code for java.awt.image.DataBuffer.setElemFloat(int, int, float)

setElemFloat sample code for java.awt.image.DataBuffer.setElemFloat(int, float) definition code for java.awt.image.DataBuffer.setElemFloat(int, float)

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 setElem(int, int) sample code for java.awt.image.DataBuffer.setElem(int, int) definition code for java.awt.image.DataBuffer.setElem(int, int) . Subclasses can override this method if another implementation is needed.

Parameters:
i - the specified index
val - the value to set the element at the specified index in the data array
See Also:
getElemFloat(int) sample code for java.awt.image.DataBuffer.getElemFloat(int) definition code for java.awt.image.DataBuffer.getElemFloat(int) , getElemFloat(int, int) sample code for java.awt.image.DataBuffer.getElemFloat(int, int) definition code for java.awt.image.DataBuffer.getElemFloat(int, int)

setElemFloat sample code for java.awt.image.DataBuffer.setElemFloat(int, int, float) definition code for java.awt.image.DataBuffer.setElemFloat(int, int, float)

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 setElem(int, int) sample code for java.awt.image.DataBuffer.setElem(int, int) definition code for java.awt.image.DataBuffer.setElem(int, int) . Subclasses can override this method if another implementation is needed.

Parameters:
bank - the specified bank
i - the specified index
val - the value to set the element in the specified bank at the specified index in the data array
See Also:
getElemFloat(int) sample code for java.awt.image.DataBuffer.getElemFloat(int) definition code for java.awt.image.DataBuffer.getElemFloat(int) , getElemFloat(int, int) sample code for java.awt.image.DataBuffer.getElemFloat(int, int) definition code for java.awt.image.DataBuffer.getElemFloat(int, int)

getElemDouble sample code for java.awt.image.DataBuffer.getElemDouble(int) definition code for java.awt.image.DataBuffer.getElemDouble(int)

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 getElem(int) sample code for java.awt.image.DataBuffer.getElem(int) definition code for java.awt.image.DataBuffer.getElem(int) to a double. Subclasses can override this method if another implementation is needed.

Parameters:
i - the specified index
Returns:
a double value representing the element at the specified index in the data array.
See Also:
setElemDouble(int, double) sample code for java.awt.image.DataBuffer.setElemDouble(int, double) definition code for java.awt.image.DataBuffer.setElemDouble(int, double) , setElemDouble(int, int, double) sample code for java.awt.image.DataBuffer.setElemDouble(int, int, double) definition code for java.awt.image.DataBuffer.setElemDouble(int, int, double)

getElemDouble sample code for java.awt.image.DataBuffer.getElemDouble(int, int) definition code for java.awt.image.DataBuffer.getElemDouble(int, int)

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.

Parameters:
bank - the specified bank
i - the specified index
Returns:
a double value representing the element from the specified bank at the specified index in the data array.
See Also:
setElemDouble(int, double) sample code for java.awt.image.DataBuffer.setElemDouble(int, double) definition code for java.awt.image.DataBuffer.setElemDouble(int, double) , setElemDouble(int, int, double) sample code for java.awt.image.DataBuffer.setElemDouble(int, int, double) definition code for java.awt.image.DataBuffer.setElemDouble(int, int, double)

setElemDouble sample code for java.awt.image.DataBuffer.setElemDouble(int, double) definition code for java.awt.image.DataBuffer.setElemDouble(int, double)

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 setElem(int, int) sample code for java.awt.image.DataBuffer.setElem(int, int) definition code for java.awt.image.DataBuffer.setElem(int, int) . Subclasses can override this method if another implementation is needed.

Parameters:
i - the specified index
val - the value to set the element at the specified index in the data array
See Also:
getElemDouble(int) sample code for java.awt.image.DataBuffer.getElemDouble(int) definition code for java.awt.image.DataBuffer.getElemDouble(int) , getElemDouble(int, int) sample code for java.awt.image.DataBuffer.getElemDouble(int, int) definition code for java.awt.image.DataBuffer.getElemDouble(int, int)

setElemDouble sample code for java.awt.image.DataBuffer.setElemDouble(int, int, double) definition code for java.awt.image.DataBuffer.setElemDouble(int, int, double)

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 setElem(int, int) sample code for java.awt.image.DataBuffer.setElem(int, int) definition code for java.awt.image.DataBuffer.setElem(int, int) . Subclasses can override this method if another implementation is needed.

Parameters:
bank - the specified bank
i - the specified index
val - the value to set the element in the specified bank at the specified index of the data array
See Also:
getElemDouble(int) sample code for java.awt.image.DataBuffer.getElemDouble(int) definition code for java.awt.image.DataBuffer.getElemDouble(int) , getElemDouble(int, int) sample code for java.awt.image.DataBuffer.getElemDouble(int, int) definition code for java.awt.image.DataBuffer.getElemDouble(int, int)