Documentation of 'org.neodatis.tool.wrappers.io.MultiBufferVO' Java class
MultiBufferVO
org.neodatis.tool.wrappers.io

Class MultiBufferVO



  • public class MultiBufferVO
    extends java.lang.Object
    A simple class to store bytes
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      long[] bufferEndPosition
      The current end position of the buffer
      byte[][] buffers 
      long[] bufferStartPosition
      The current start position of the buffer
      int[] maxPositionInBuffer
      The max position in the buffer, used to optimize the flush - to flush only new data and not all the buffer
    • Constructor Summary

      Constructors 
      Constructor and Description
      MultiBufferVO(int numberOfBuffers, int bufferSize) 
    • Field Detail

      • buffers

        public byte[][] buffers
      • bufferStartPosition

        public long[] bufferStartPosition
        The current start position of the buffer
      • bufferEndPosition

        public long[] bufferEndPosition
        The current end position of the buffer
      • maxPositionInBuffer

        public int[] maxPositionInBuffer
        The max position in the buffer, used to optimize the flush - to flush only new data and not all the buffer
    • Constructor Detail

      • MultiBufferVO

        public MultiBufferVO(int numberOfBuffers,
                             int bufferSize)
    • Method Detail

      • getBuffer2

        public byte[] getBuffer2(int index)
      • getByte

        public byte getByte(int bufferIndex,
                            int byteIndex)
      • clearBuffer

        public void clearBuffer(int bufferIndex)
        Parameters:
        i -
      • setByte

        public void setByte(int bufferIndex,
                            int positionInBuffer,
                            byte b)
        Parameters:
        bufferIndex -
        positionInBuffer -
        b -
      • getBufferIndexForPosition

        public int getBufferIndexForPosition(long position,
                                             int size)
      • setCreationDate

        public void setCreationDate(int bufferIndex,
                                    long currentTimeInMs)
        Parameters:
        bufferIndex -
        currentTimeInMs -
      • setPositions

        public void setPositions(int bufferIndex,
                                 long startPosition,
                                 long endPosition,
                                 int maxPosition)
        Parameters:
        bufferIndex -
        newPosition -
        endPosition -
        i -
      • writeBytes

        public void writeBytes(int bufferIndex,
                               byte[] bytes,
                               int startIndex,
                               int offsetWhereToCopy,
                               int lengthToCopy)
        Parameters:
        bufferIndex -
        bytes -
        startIndex -
        i -
        lengthToCopy -
      • hasBeenUsedForWrite

        public boolean hasBeenUsedForWrite(int bufferIndex)
        Parameters:
        bufferIndex -
        Returns:
      • clear

        public void clear()
      • getCreationDate

        public long getCreationDate(int bufferIndex)
        Parameters:
        i -
        Returns:

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.