Back to index

wims  3.65+svn20090927
Public Member Functions | Package Attributes | Private Attributes
rene.util.SimpleByteBuffer Class Reference

List of all members.

Public Member Functions

 SimpleByteBuffer (int size)
 SimpleByteBuffer (byte b[])
void append (byte c)
void clear ()
byte[] getBuffer ()
byte[] getByteArray ()
int size ()

Package Attributes

int N

Private Attributes

int Size
byte Buf []

Detailed Description

Definition at line 2 of file SimpleByteBuffer.java.


Constructor & Destructor Documentation

Definition at line 5 of file SimpleByteBuffer.java.

       {      Size=size;
              Buf=new byte[size];
              N=0;
       }

Here is the call graph for this function:

Definition at line 10 of file SimpleByteBuffer.java.

       {      Size=b.length;
              Buf=b;
              N=0;
       }

Member Function Documentation

void rene.util.SimpleByteBuffer.append ( byte  c) [inline]

Definition at line 15 of file SimpleByteBuffer.java.

       {      if (N<Size) Buf[N++]=c;
              else
              {      Size=2*Size;
                     byte NewBuf[]=new byte[Size];
                     for (int i=0; i<N; i++) NewBuf[i]=Buf[i];
                     Buf=NewBuf;
                     Buf[N++]=c;
              }
       }

Here is the caller graph for this function:

Definition at line 25 of file SimpleByteBuffer.java.

       {      N=0;
       }

Definition at line 28 of file SimpleByteBuffer.java.

       {      return Buf;
       }

Definition at line 31 of file SimpleByteBuffer.java.

       {      byte b[]=new byte[N];
              for (int i=0; i<N; i++) b[i]=Buf[i];
              return b;
       }

Here is the caller graph for this function:

Definition at line 36 of file SimpleByteBuffer.java.

       {      return N;
       }

Here is the caller graph for this function:


Member Data Documentation

Definition at line 4 of file SimpleByteBuffer.java.

Definition at line 3 of file SimpleByteBuffer.java.

Definition at line 3 of file SimpleByteBuffer.java.


The documentation for this class was generated from the following file: