com.inxar.syntacs.util
Class Buffer

java.lang.Object
  |
  +--com.inxar.syntacs.util.Buffer
All Implemented Interfaces:
Cloneable

public class Buffer
extends Object
implements Cloneable

Simpler, unsynchronized implementation of StringBuffer that can render itself to a Writer.


Constructor Summary
Buffer()
           
Buffer(int capacity)
           
 
Method Summary
 Buffer add(boolean val)
           
 Buffer add(Buffer that)
           
 Buffer add(char val)
           
 Buffer add(char[] that_src)
           
 Buffer add(char[] that_src, int that_off, int that_len)
           
 Buffer add(int val)
           
 Buffer add(long val)
           
 Buffer add(String val)
           
 Buffer add(String val, int offset, int length)
           
 char charAt(int i)
           
 Object clone()
           
 Buffer copy(int capacity)
           
 char[] getCharArray()
           
 int length()
           
 void length(int that_len)
           
 Buffer ln()
           
 void realloc()
           
 Buffer set(int offset, char[] that_src, int that_off, int length)
           
 Buffer set(int offset, String s)
           
 Buffer setCharAt(int i, char c)
           
 String toString()
           
 void toWriter(Writer out)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Buffer

public Buffer()

Buffer

public Buffer(int capacity)
Method Detail

set

public Buffer set(int offset,
                  String s)

set

public Buffer set(int offset,
                  char[] that_src,
                  int that_off,
                  int length)

add

public Buffer add(String val,
                  int offset,
                  int length)

add

public Buffer add(String val)

add

public Buffer add(boolean val)

add

public Buffer add(char val)

add

public Buffer add(int val)

add

public Buffer add(long val)

ln

public Buffer ln()

add

public Buffer add(Buffer that)

add

public Buffer add(char[] that_src)

add

public Buffer add(char[] that_src,
                  int that_off,
                  int that_len)

setCharAt

public Buffer setCharAt(int i,
                        char c)

charAt

public char charAt(int i)

length

public int length()

length

public void length(int that_len)

copy

public Buffer copy(int capacity)

realloc

public void realloc()

toString

public String toString()
Overrides:
toString in class Object

toWriter

public void toWriter(Writer out)
              throws IOException

clone

public Object clone()
             throws CloneNotSupportedException

getCharArray

public char[] getCharArray()