net.dpml.lang
Class Buffer
java.lang.Object
net.dpml.lang.Buffer
public final class Buffer
- extends Object
Utility class used as a destination during generalized object encoding.
- Version:
- 2.0.0
- Author:
- Digital Product Management Laboratory
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Buffer
public Buffer(Writer writer,
String namespace,
String pad)
- Construct a new encoding buffer.
- Parameters:
writer
- the output stream writernamespace
- the current namespacepad
- the current offset
- Throws:
NullPointerException
- of the writer or namespace arguments are null
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)