Save This Page
Home » openjdk-7 » java » awt » image » [javadoc | source]
java.awt.image
public final class: DataBufferInt [javadoc | source]
java.lang.Object
   java.awt.image.DataBuffer
      java.awt.image.DataBufferInt
This class extends DataBuffer and stores data internally as integers.

Note that some implementations may function more efficiently if they can maintain control over how the data for an image is stored. For example, optimizations such as caching an image in video memory require that the implementation track all modifications to that data. Other implementations may operate better if they can store the data in locations other than a Java array. To maintain optimum compatibility with various optimizations it is best to avoid constructors and methods which expose the underlying storage as a Java array as noted below in the documentation for those methods.
Field Summary
 int[] data    The default data bank. 
 int[][] bankdata    All data banks 
Fields inherited from java.awt.image.DataBuffer:
TYPE_BYTE,  TYPE_USHORT,  TYPE_SHORT,  TYPE_INT,  TYPE_FLOAT,  TYPE_DOUBLE,  TYPE_UNDEFINED,  dataType,  banks,  offset,  size,  offsets,  theTrackable
Constructor:
 public DataBufferInt(int size) 
 public DataBufferInt(int size,
    int numBanks) 
 public DataBufferInt(int[] dataArray,
    int size) 
    Parameters:
    dataArray - The integer array for the DataBuffer.
    size - The size of the DataBuffer bank.
 public DataBufferInt(int[][] dataArray,
    int size) 
    Parameters:
    dataArray - The integer arrays for the DataBuffer.
    size - The size of the banks in the DataBuffer.
 public DataBufferInt(int[] dataArray,
    int size,
    int offset) 
    Parameters:
    dataArray - The integer array for the DataBuffer.
    size - The size of the DataBuffer bank.
    offset - The offset into the dataArray.
 public DataBufferInt(int[][] dataArray,
    int size,
    int[] offsets) 
    Parameters:
    dataArray - The integer arrays for the DataBuffer.
    size - The size of the banks in the DataBuffer.
    offsets - The offsets into each array.
Method from java.awt.image.DataBufferInt Summary:
getBankData,   getData,   getData,   getElem,   getElem,   setElem,   setElem
Methods from java.awt.image.DataBuffer:
getDataType,   getDataTypeSize,   getElem,   getElem,   getElemDouble,   getElemDouble,   getElemFloat,   getElemFloat,   getNumBanks,   getOffset,   getOffsets,   getSize,   setElem,   setElem,   setElemDouble,   setElemDouble,   setElemFloat,   setElemFloat,   toIntArray
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from java.awt.image.DataBufferInt Detail:
 public int[][] getBankData() 
    Returns the data arrays for all banks.

    Note that calling this method may cause this {@code DataBuffer} object to be incompatible with performance optimizations used by some implementations (such as caching an associated image in video memory).

 public int[] getData() 
    Returns the default (first) int data array in DataBuffer.

    Note that calling this method may cause this {@code DataBuffer} object to be incompatible with performance optimizations used by some implementations (such as caching an associated image in video memory).

 public int[] getData(int bank) 
    Returns the data array for the specified bank.

    Note that calling this method may cause this {@code DataBuffer} object to be incompatible with performance optimizations used by some implementations (such as caching an associated image in video memory).

 public int getElem(int i) 
    Returns the requested data array element from the first (default) bank.
 public int getElem(int bank,
    int i) 
    Returns the requested data array element from the specified bank.
 public  void setElem(int i,
    int val) 
    Sets the requested data array element in the first (default) bank to the specified value.
 public  void setElem(int bank,
    int i,
    int val) 
    Sets the requested data array element in the specified bank to the integer value i.