|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.OutputStream
com.cometway.io.StringBufferOutputStream
public class StringBufferOutputStream
This extension of java.io.OutputStream writes to a StringBuffer. The StringBuffer passed in to the constructor of this class will be filled with the data written to this OutputStream.
| Field Summary | |
|---|---|
protected java.lang.StringBuffer |
buffer
|
protected boolean |
closed
|
protected java.lang.Object |
syncObject
|
| Constructor Summary | |
|---|---|
StringBufferOutputStream(java.lang.StringBuffer out)
The StringBuffer out will be filled with the data written to this OutputStream. |
|
| Method Summary | |
|---|---|
void |
close()
This method sets the closed flag. |
void |
flush()
This method is blank. |
void |
write(byte[] b)
Write an array of bytes. |
void |
write(byte[] b,
int start,
int length)
Write an array of bytes starting from start and writes length number of bytes. |
void |
write(int b)
Write a single byte. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.StringBuffer buffer
protected java.lang.Object syncObject
protected boolean closed
| Constructor Detail |
|---|
public StringBufferOutputStream(java.lang.StringBuffer out)
| Method Detail |
|---|
public void close()
close in interface java.io.Closeableclose in class java.io.OutputStreampublic void flush()
flush in interface java.io.Flushableflush in class java.io.OutputStream
public void write(int b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOException
public void write(byte[] b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOException
public void write(byte[] b,
int start,
int length)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||