Name
java.io.ByteArrayOutputStream
Synopsis
This class is a slightly smaller version of its J2SE counterpart. It
is a subclass of java.io.OutputStream
, which
writes data out as a series of bytes.
public classByteArrayOutputStream
extends java.io.OutputStream { // protected fields protected byte[]buf;
protected intcount;
// constructors publicByteArrayOutputStream
(); publicByteArrayOutputStream
(int size); // public instance methods public synchronized voidclose
() throws java.io.IOException; public synchronized voidreset
(); public intsize
(); public synchronized byte[]toByteArray
(); public StringtoString
(); public synchronized voidwrite
(int b); public synchronized voidwrite
(byte[] b, int off, int len); }
Get Wireless Java now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.