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

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
 short[] data    The default data bank. 
 short[][] 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 DataBufferShort(int size) 
 public DataBufferShort(int size,
    int numBanks) 
 public DataBufferShort(short[] dataArray,
    int size) 
    Parameters:
    dataArray - The short array for the DataBuffer.
    size - The size of the DataBuffer bank.
 public DataBufferShort(short[][] dataArray,
    int size) 
    Parameters:
    dataArray - The short arrays for the DataBuffer.
    size - The size of the banks in the DataBuffer.
 public DataBufferShort(short[] dataArray,
    int size,
    int offset) 
    Parameters:
    dataArray - The short array for the DataBuffer.
    size - The size of the DataBuffer bank.
    offset - The offset into the dataArray.
 public DataBufferShort(short[][] dataArray,
    int size,
    int[] offsets) 
    Parameters:
    dataArray - The short arrays for the DataBuffer.
    size - The size of the banks in the DataBuffer.
    offsets - The offsets into each array.
Method from java.awt.image.DataBufferShort 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.DataBufferShort Detail:
 public short[][] 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 short[] getData() 
    Returns the default (first) byte data array.

    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 short[] 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 from the given integer.