org.caleigo.toolkit.util
Class CircularByteBuffer

java.lang.Object
  extended byorg.caleigo.toolkit.util.CircularByteBuffer

public class CircularByteBuffer
extends java.lang.Object

Version:
1.00
Author:
Mattias Hagstrand

Field Summary
protected  int mAvailableSpace
           
protected  byte[] mBuffer
           
protected  int mBufferSize
           
protected  int mCurrentReadPosition
           
protected  int mCurrentWritePosition
           
 
Constructor Summary
CircularByteBuffer(int bufferSize)
           
 
Method Summary
 void addToBuffer(byte[] b, int off, int len)
           
protected  int getAvailableBufferSpace()
           
 int getBufferSize()
           
 int getFromBuffer(byte[] b, int off, int len)
           
protected  void resizeBuffer()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mBuffer

protected byte[] mBuffer

mBufferSize

protected int mBufferSize

mCurrentReadPosition

protected int mCurrentReadPosition

mCurrentWritePosition

protected int mCurrentWritePosition

mAvailableSpace

protected int mAvailableSpace
Constructor Detail

CircularByteBuffer

public CircularByteBuffer(int bufferSize)
Method Detail

addToBuffer

public void addToBuffer(byte[] b,
                        int off,
                        int len)

getFromBuffer

public int getFromBuffer(byte[] b,
                         int off,
                         int len)

getBufferSize

public int getBufferSize()

resizeBuffer

protected void resizeBuffer()

getAvailableBufferSpace

protected int getAvailableBufferSpace()


Copyright © 2005 Caleigo. All Rights Reserved.