|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.OutputStream
java.io.FilterOutputStream
org.foray.common.CharacterOutputStream
public class CharacterOutputStream
Output stream used to write character-based data (that is, Strings) to a wrapped (byte-based) output stream. Has methods to write Strings as raw Strings and to write them as lines (appending an end-of-line character).
| Field Summary |
|---|
| Fields inherited from class java.io.FilterOutputStream |
|---|
out |
| Constructor Summary | |
|---|---|
CharacterOutputStream(OutputStream out,
boolean commentsEnabled)
Constructor. |
|
| Method Summary | |
|---|---|
void |
comment(String comment)
Writes a given comment, if comments are enabled. |
void |
write(CharSequence cmd)
Writes text to the stream, adding a linefeed at the end. |
void |
writeByteArr(byte[] cmd)
Writes an array of bytes to the output stream. |
void |
writeRaw(CharSequence cmd)
Writes text to the stream (no linefeed is appended). |
| Methods inherited from class java.io.FilterOutputStream |
|---|
close, flush, write, write, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CharacterOutputStream(OutputStream out,
boolean commentsEnabled)
out - The encapsulated OutputStream.commentsEnabled - Indicates whether comments should be written.
If false, the method comment(String) is ignored.| Method Detail |
|---|
public void write(CharSequence cmd)
throws IOException
cmd - The text to be written to the output stream.
IOException - For I/O errors during the write.
public void writeRaw(CharSequence cmd)
throws IOException
cmd - The text to be written to the output stream.
IOException - For I/O errors during the write.
public void writeByteArr(byte[] cmd)
throws IOException
cmd - The array of bytes to be written to the output stream.
IOException - For I/O errors during the write.
public void comment(String comment)
throws IOException
comment - The comment to be written.
IOException - For I/O errors during the write.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||