codesimian
Class ByteBuf

java.lang.Object
  extended by codesimian.ByteBuf

public class ByteBuf
extends java.lang.Object


Constructor Summary
ByteBuf()
          get more bytes from byteMaker if count is less than this * private int minCount = -1; public final int minCount(){ return minCount; } /** how many bytes to get from byteMaker at a time * private int byteMakerIncrement = -1; public final int byteMakerIncrement(){ return byteMakerIncrement; } /** where to get bytes from when needed * private ByteMaker byteMaker = null; public final ByteMaker byteMaker(){ return byteMaker; }
 
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()
get more bytes from byteMaker if count is less than this * private int minCount = -1; public final int minCount(){ return minCount; } /** how many bytes to get from byteMaker at a time * private int byteMakerIncrement = -1; public final int byteMakerIncrement(){ return byteMakerIncrement; } /** where to get bytes from when needed * private ByteMaker byteMaker = null; public final ByteMaker byteMaker(){ return byteMaker; }

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)