codesimian
Class ByteBuf

java.lang.Object
  extended by codesimian.ByteBuf

public class ByteBuf
extends java.lang.Object


Constructor Summary
ByteBuf()
           
 
Method Summary
 void add(byte[] bytes)
          add some bytes, which become the newest bytes
 int count()
           
static void main(java.lang.String[] a)
           
 byte[] remove(int bytesToRemove)
          Removes and returns the oldest 'numBytes' bytes, or all remaining bytes if not that many exist, or null if no bytes exist.
Will split an array added by add() if necessary.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ByteBuf

public ByteBuf()
Method Detail

count

public final int count()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

remove

public byte[] remove(int bytesToRemove)
Removes and returns the oldest 'numBytes' bytes, or all remaining bytes if not that many exist, or null if no bytes exist.
Will split an array added by add() if necessary.


add

public void add(byte[] bytes)
add some bytes, which become the newest bytes


main

public static void main(java.lang.String[] a)