ch.bind.philib.io
Class RingBuffer

java.lang.Object
  extended by ch.bind.philib.io.RingBuffer
All Implemented Interfaces:
DoubleSidedBuffer

public final class RingBuffer
extends Object
implements DoubleSidedBuffer

TODO

Author:
Philipp Meinen

Field Summary
static int DEFAULT_CAPACITY
           
 
Constructor Summary
RingBuffer()
           
RingBuffer(int capacity)
           
 
Method Summary
 int available()
           
 int capacity()
           
 void clear()
           
 boolean isEmpty()
           
 void read(byte[] data)
           
 void read(byte[] data, int off, int len)
           
 void readBack(byte[] data)
           
 void readBack(byte[] data, int off, int len)
           
 void write(byte[] data)
           
 void write(byte[] data, int off, int len)
           
 void writeFront(byte[] data)
           
 void writeFront(byte[] data, int off, int len)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_CAPACITY

public static final int DEFAULT_CAPACITY
See Also:
Constant Field Values
Constructor Detail

RingBuffer

public RingBuffer()

RingBuffer

public RingBuffer(int capacity)
Method Detail

available

public int available()
Specified by:
available in interface DoubleSidedBuffer

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface DoubleSidedBuffer

capacity

public int capacity()
Specified by:
capacity in interface DoubleSidedBuffer

clear

public void clear()
Specified by:
clear in interface DoubleSidedBuffer

read

public void read(byte[] data)
Specified by:
read in interface DoubleSidedBuffer

read

public void read(byte[] data,
                 int off,
                 int len)
Specified by:
read in interface DoubleSidedBuffer

readBack

public void readBack(byte[] data)
Specified by:
readBack in interface DoubleSidedBuffer

readBack

public void readBack(byte[] data,
                     int off,
                     int len)
Specified by:
readBack in interface DoubleSidedBuffer

write

public void write(byte[] data)
Specified by:
write in interface DoubleSidedBuffer

write

public void write(byte[] data,
                  int off,
                  int len)
Specified by:
write in interface DoubleSidedBuffer

writeFront

public void writeFront(byte[] data)
Specified by:
writeFront in interface DoubleSidedBuffer

writeFront

public void writeFront(byte[] data,
                       int off,
                       int len)
Specified by:
writeFront in interface DoubleSidedBuffer


Copyright © 2013. All Rights Reserved.