Home » openjdk-7 » java » awt » image » [javadoc | source]
java.awt.image
public final class: DataBufferUShort [javadoc | source]
java.lang.Object
   java.awt.image.DataBuffer
      java.awt.image.DataBufferUShort
This class extends DataBuffer and stores data internally as shorts. Values stored in the short array(s) of this DataBuffer are treated as unsigned values.

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 DataBufferUShort(int size) 
 public DataBufferUShort(int size,
    int numBanks) 
 public DataBufferUShort(short[] dataArray,
    int size) 
    Parameters:
    dataArray - The unsigned-short array for the DataBuffer.
    size - The size of the DataBuffer bank.
 public DataBufferUShort(short[][] dataArray,
    int size) 
    Parameters:
    dataArray - The unsigned-short arrays for the DataBuffer.
    size - The size of the banks in the DataBuffer.
 public DataBufferUShort(short[] dataArray,
    int size,
    int offset) 
    Parameters:
    dataArray - The unsigned-short array for the DataBuffer.
    size - The size of the DataBuffer bank.
    offset - The offset into the dataArray.
 public DataBufferUShort(short[][] dataArray,
    int size,
    int[] offsets) 
    Parameters:
    dataArray - The unsigned-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.DataBufferUShort 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.DataBufferUShort 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) unsigned-short 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.