- java.lang.Object
-
- java.io.OutputStream
-
- java.io.ByteArrayOutputStream
-
- com.aoapps.lang.io.AoByteArrayOutputStream
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
public class AoByteArrayOutputStream extends ByteArrayOutputStream
Provides direct access to the internalbyte[].- Author:
- AO Industries, Inc.
-
-
Field Summary
-
Fields inherited from class java.io.ByteArrayOutputStream
buf, count
-
-
Constructor Summary
Constructors Constructor Description AoByteArrayOutputStream()AoByteArrayOutputStream(int size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getInternalByteArray()Provides direct access to the internal byte[] to avoid unnecessary copying of the array.voidwriteTo(OutputStream out, int off, int len)Writes a portion of the contents of the buffer to another byte stream.voidwriteTo(RandomAccessFile raf)voidwriteTo(RandomAccessFile raf, int off, int len)-
Methods inherited from class java.io.ByteArrayOutputStream
close, reset, size, toByteArray, toString, toString, toString, toString, write, write, writeBytes, writeTo
-
Methods inherited from class java.io.OutputStream
flush, nullOutputStream, write
-
-
-
-
Method Detail
-
getInternalByteArray
public byte[] getInternalByteArray()
Provides direct access to the internal byte[] to avoid unnecessary copying of the array.
-
writeTo
public void writeTo(OutputStream out, int off, int len) throws IOException
Writes a portion of the contents of the buffer to another byte stream.- Throws:
IOException
-
writeTo
public void writeTo(RandomAccessFile raf) throws IOException
- Throws:
IOException
-
writeTo
public void writeTo(RandomAccessFile raf, int off, int len) throws IOException
- Throws:
IOException
-
-