Java org.apache.commons.io.output ByteArrayOutputStream fields, constructors, methods, implement or subclass

Example usage for Java org.apache.commons.io.output ByteArrayOutputStream fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.commons.io.output ByteArrayOutputStream.

The text is from its open source code.

Subclass

org.apache.commons.io.output.ByteArrayOutputStream has subclasses.
Click this link to see all its subclasses.

Constructor

ByteArrayOutputStream()
Creates a new byte array output stream.
ByteArrayOutputStream(int size)
Creates a new byte array output stream, with a buffer capacity of the specified size, in bytes.

Method

voidclose()
Closing a ByteArrayOutputStream has no effect.
voidflush()
Flushes this output stream and forces any buffered output bytes to be written out.
voidreset()
intsize()
Return the current size of the byte array.
byte[]toByteArray()
Gets the curent contents of this byte stream as a byte array.
StringtoString()
Gets the curent contents of this byte stream as a string.
StringtoString(String enc)
Gets the curent contents of this byte stream as a string using the specified encoding.
voidwrite(byte[] b, int off, int len)
Write the bytes to byte array.
voidwrite(int b)
Write a byte to byte array.
intwrite(InputStream in)
Writes the entire contents of the specified input stream to this byte stream.
voidwriteTo(OutputStream out)
Writes the entire contents of this byte stream to the specified output stream.