API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.awt.image. DataBuffer View Source
Author(s)
Since
Version
Serial
Hierarchy
 Object
      DataBuffer
Implements
Subclasses
Description
publicabstract abstract class DataBuffer
  This class exists to wrap one or more data arrays.
See also:    Raster SampleModel
Constructors
protected DataBuffer (int dataType, int size)
  Constructs a DataBuffer containing one bank of the specified data type and size.
protected DataBuffer (int dataType, int size, int numBanks)
  Constructs a DataBuffer containing the specified number of banks.
protected DataBuffer (int dataType, int size, int numBanks, int offset)
  Constructs a DataBuffer that contains the specified number of banks.
protected DataBuffer (int dataType, int size, int numBanks, int[] offsets)
  Constructs a DataBuffer which contains the specified number of banks.
Methods
Hide/Show inherited methods
public int getDataType ()
  Returns the data type of this DataBuffer.
publicstatic int getDataTypeSize (int type)
  Returns the size (in bits) of the data type, given a datatype tag.
public int getElem (int i)
  Returns the requested data array element from the first (default) bank as an integer.
publicabstract int getElem (int bank, int i)
  Returns the requested data array element from the specified bank as an integer.
public double getElemDouble (int i)
  Returns the requested data array element from the first (default) bank as a double.
public double getElemDouble (int bank, int i)
  Returns the requested data array element from the specified bank as a double.
public float getElemFloat (int i)
  Returns the requested data array element from the first (default) bank as a float.
public float getElemFloat (int bank, int i)
  Returns the requested data array element from the specified bank as a float.
public int getNumBanks ()
  Returns the number of banks in this DataBuffer.
public int getOffset ()
  Returns the offset of the default bank in array elements.
public int getOffsets ()
  Returns the offsets (in array elements) of all the banks.
public int getSize ()
  Returns the size (in array elements) of all banks.
public void setElem (int i, int val)
  Sets the requested data array element in the first (default) bank from the given integer.
publicabstract void setElem (int bank, int i, int val)
  Sets the requested data array element in the specified bank from the given integer.
public void setElemDouble (int i, double val)
  Sets the requested data array element in the first (default) bank from the given double.
public void setElemDouble (int bank, int i, double val)
  Sets the requested data array element in the specified bank from the given double.
public void setElemFloat (int i, float val)
  Sets the requested data array element in the first (default) bank from the given float.
public void setElemFloat (int bank, int i, float val)
  Sets the requested data array element in the specified bank from the given float.
pack-privatestatic int toIntArray (Object obj)
Fields
Hide/Show inherited fields
protected int banks
The number of banks in this DataBuffer.
protected int dataType
The data type of this DataBuffer.
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.
publicfinalstatic int TYPE_BYTE = "0"
Tag for unsigned byte data.
publicfinalstatic int TYPE_DOUBLE = "5"
  Tag for double data.
publicfinalstatic int TYPE_FLOAT = "4"
  Tag for float data.
publicfinalstatic int TYPE_INT = "3"
Tag for int data.
publicfinalstatic int TYPE_SHORT = "2"
  Tag for signed short data.
publicfinalstatic int TYPE_UNDEFINED = "32"
Tag for undefined data.
publicfinalstatic int TYPE_USHORT = "1"
Tag for unsigned short data.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar