net.dpml.lang
Class Buffer

java.lang.Object
  extended by net.dpml.lang.Buffer

public final class Buffer
extends Object

Utility class used as a destination during generalized object encoding.

Version:
2.0.1
Author:
Digital Product Management Laboratory

Constructor Summary
Buffer(Writer writer, String namespace, String pad)
          Construct a new encoding buffer.
 
Method Summary
 String getEnclosingNamespace()
           
 String getOffset()
           
 Buffer indent()
           
 Buffer indent(String indent)
           
 boolean isNamespace(String namespace)
           
 Buffer namespace(String namespace)
           
 void nl(char[] array)
           
 void nl(int n)
           
 void nl(String value)
           
 void write(char[] array)
           
 void write(int n)
           
 void write(String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Buffer

public Buffer(Writer writer,
              String namespace,
              String pad)
Construct a new encoding buffer.

Parameters:
writer - the output stream writer
namespace - the current namespace
pad - the current offset
Throws:
NullPointerException - of the writer or namespace arguments are null
Method Detail

getEnclosingNamespace

public String getEnclosingNamespace()

getOffset

public String getOffset()

write

public void write(String value)
           throws IOException
Throws:
IOException

write

public void write(int n)
           throws IOException
Throws:
IOException

write

public void write(char[] array)
           throws IOException
Throws:
IOException

nl

public void nl(String value)
        throws IOException
Throws:
IOException

nl

public void nl(int n)
        throws IOException
Throws:
IOException

nl

public void nl(char[] array)
        throws IOException
Throws:
IOException

indent

public Buffer indent()

indent

public Buffer indent(String indent)

isNamespace

public boolean isNamespace(String namespace)

namespace

public Buffer namespace(String namespace)