|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.OutputStream
org.apache.felix.ipojo.junit4osgi.plugin.StringOutputStream
public class StringOutputStream
Provides an OutputStream to an internal String. Internally converts bytes to a Strings and stores them in an internal StringBuffer.
Field Summary | |
---|---|
protected StringBuffer |
m_buffer
The internal destination StringBuffer. |
Constructor Summary | |
---|---|
StringOutputStream()
Creates new StringOutputStream, makes a new internal StringBuffer. |
Method Summary | |
---|---|
void |
close()
Sets the internal StringBuffer to null. |
static char[] |
toCharArray(byte[] barr)
Converts byte array to char array. |
String |
toString()
Returns the content of the internal StringBuffer as a String, the result of all writing to this OutputStream. |
void |
write(byte[] b,
int off,
int len)
Writes and appends a byte array to StringOutputStream. |
void |
write(int b)
Writes and appends a single byte to StringOutputStream. |
void |
write(String s)
Writes and appends a String to StringOutputStream. |
Methods inherited from class java.io.OutputStream |
---|
flush, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected StringBuffer m_buffer
Constructor Detail |
---|
public StringOutputStream()
Method Detail |
---|
public String toString()
toString
in class Object
public void close()
close
in class OutputStream
public void write(byte[] b, int off, int len)
write
in class OutputStream
b
- the byte arrayoff
- the byte array starting indexlen
- the number of bytes from byte array to write to the streampublic void write(int b)
write
in class OutputStream
b
- the byte as an int to addpublic void write(String s)
s
- the String to addpublic static char[] toCharArray(byte[] barr)
barr
- input byte array
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |