public class ByteArrayOutputStream extends OutputStream
| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
buf
buf
|
protected int |
count
count
|
| Constructor and Description |
|---|
ByteArrayOutputStream()
ByteArrayOutputStream
|
ByteArrayOutputStream(int i)
ByteArrayOutputStream
|
| Modifier and Type | Method and Description |
|---|---|
void |
flush() |
void |
reset()
reset
|
int |
size() |
byte[] |
toByteArray() |
String |
toString()
Returns a string representation of the object.
|
String |
toString(int i) |
String |
toString(String s) |
void |
write(byte[] abyte0,
int i,
int j) |
void |
write(int i) |
void |
writeTo(OutputStream outputstream) |
close, writepublic ByteArrayOutputStream()
public ByteArrayOutputStream(int i)
i - ?public void reset()
public int size()
public byte[] toByteArray()
public String toString()
ObjecttoString method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@', and
the unsigned hexadecimal representation of the hash code of the
object.
public String toString(int i)
i - ?public String toString(String s) throws UnsupportedEncodingException
s - ?UnsupportedEncodingException - ?public void write(int i)
write in class OutputStreami - ?public void flush()
flush in class OutputStreampublic void write(byte[] abyte0,
int i,
int j)
write in class OutputStreamabyte0 - ?i - ?j - ?public void writeTo(OutputStream outputstream) throws IOException
outputstream - ?IOException - ?