Class DataBufferByteWriter


  • public class DataBufferByteWriter
    extends java.awt.image.DataBuffer
    An implementation of the DataBuffer abstract class which wraps a ByteWriter inside it. All the data written to the DataBuffer will actually be read from and written to the byteWriter. This class is used for the BufferedImages which has the raster data in the DataBuffers.
    • Field Summary

      • Fields inherited from class java.awt.image.DataBuffer

        TYPE_BYTE, TYPE_DOUBLE, TYPE_FLOAT, TYPE_INT, TYPE_SHORT, TYPE_UNDEFINED, TYPE_USHORT
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      int getElem​(int bank, int i)  
      long length()  
      void setElem​(int bank, int i, int val)  
      • Methods inherited from class java.awt.image.DataBuffer

        getDataType, getDataTypeSize, getElem, getElemDouble, getElemDouble, getElemFloat, getElemFloat, getNumBanks, getOffset, getOffsets, getSize, setElem, setElemDouble, setElemDouble, setElemFloat, setElemFloat
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DataBufferByteWriter

        public DataBufferByteWriter​(ByteWriter byteWriter,
                                    int dataType,
                                    int size)
        Parameters:
        byteWriter -
        dataType -
        size -
    • Method Detail

      • getElem

        public int getElem​(int bank,
                           int i)
        Specified by:
        getElem in class java.awt.image.DataBuffer
        See Also:
        DataBuffer.getElem(int, int)
      • setElem

        public void setElem​(int bank,
                            int i,
                            int val)
        Specified by:
        setElem in class java.awt.image.DataBuffer
        See Also:
        DataBuffer.setElem(int, int, int)
      • length

        public long length()
                    throws java.io.IOException
        Throws:
        java.io.IOException
        See Also:
        ByteReader.length()
      • close

        public void close()
                   throws java.io.IOException
        Throws:
        java.io.IOException
        See Also:
        ByteReader.close()