Top Description Fields Constructors Methods
org.eclipse.jetty.util

public Class ByteArrayOutputStream2

extends ByteArrayOutputStream
Class Inheritance
Imports
java.io.ByteArrayOutputStream, java.nio.charset.Charset

ByteArrayOutputStream with public internals

Field Summary

Inherited from java.io.ByteArrayOutputStream:
bufcount

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public byte[]
public int
public void
reset(int minSize)

public void
setCount(int count)

public String
toString(Charset
the charset to be used to decode the bytes
charset
)

Overrides java.io.ByteArrayOutputStream.toString.

Converts the buffer's contents into a string by decoding the bytes using the specified charset.
public void
Inherited from java.io.ByteArrayOutputStream:
closeresetsizetoByteArraytoStringtoStringtoStringwritewritewriteByteswriteTo

Constructor Detail

ByteArrayOutputStream2back to summary
public ByteArrayOutputStream2()
ByteArrayOutputStream2back to summary
public ByteArrayOutputStream2(int size)

Method Detail

getBufback to summary
public byte[] getBuf()
getCountback to summary
public int getCount()
resetback to summary
public void reset(int minSize)
setCountback to summary
public void setCount(int count)
toStringback to summary
public String toString(Charset charset)

Overrides java.io.ByteArrayOutputStream.toString.

Doc from java.io.ByteArrayOutputStream.toString.

Converts the buffer's contents into a string by decoding the bytes using the specified charset. The length of the new String is a function of the charset, and hence may not be equal to the length of the byte array.

This method always replaces malformed-input and unmappable-character sequences with the charset's default replacement string. The java.nio.charset.CharsetDecoder class should be used when more control over the decoding process is required.

Parameters
charset:Charset

the charset to be used to decode the bytes

Returns:String

String decoded from the buffer's contents.

writeUncheckedback to summary
public void writeUnchecked(int b)