|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.dpml.lang.Buffer
public final class Buffer
Utility class used as a destination during generalized object encoding.
Constructor Summary | |
---|---|
Buffer(Writer writer,
String namespace,
String pad)
Construct a new encoding buffer. |
Method Summary | |
---|---|
String |
getEnclosingNamespace()
Get the current namespace. |
String |
getOffset()
Get the space indent offset. |
Buffer |
indent()
Indent the current offset value by 2 space characters. |
Buffer |
indent(String indent)
Indent the current offset value by a supplied value. |
boolean |
isNamespace(String namespace)
Test id the supplied namespace is the current namesapce. |
Buffer |
namespace(String namespace)
Creation of a new buffer mapped to the supplied namespace. |
void |
nl(char[] array)
Write an character array value to the buffer following a nl character. |
void |
nl(int n)
Write an int value to the buffer following a nl character. |
void |
nl(String value)
Write a value to the buffer following a nl character. |
void |
write(char[] array)
Write an character array value to the buffer. |
void |
write(int n)
Write an int value to the buffer. |
void |
write(String value)
Write a value to the buffer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Buffer(Writer writer, String namespace, String pad) throws NullPointerException
writer
- the output stream writernamespace
- the current namespacepad
- the current offset
NullPointerException
- of the writer or namespace arguments are nullMethod Detail |
---|
public String getEnclosingNamespace()
public String getOffset()
public void write(String value) throws IOException
value
- the value to write to the buffer
IOException
- if an IO error occurspublic void write(int n) throws IOException
n
- the int value to write to the buffer
IOException
- if an IO error occurspublic void write(char[] array) throws IOException
array
- the array value to write to the buffer
IOException
- if an IO error occurspublic void nl(String value) throws IOException
value
- the value to write to the buffer
IOException
- if an IO error occurspublic void nl(int n) throws IOException
n
- the int value to write to the buffer
IOException
- if an IO error occurspublic void nl(char[] array) throws IOException
array
- the array value to write to the buffer
IOException
- if an IO error occurspublic Buffer indent()
public Buffer indent(String indent)
indent
- the indent value
public boolean isNamespace(String namespace)
namespace
- to namespace to compare with the current namespace
public Buffer namespace(String namespace)
namespace
- the namespace
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |