java.lang.Object
java.io.OutputStream
java.io.ByteArrayOutputStream
com.aoapps.lang.io.AoByteArrayOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
Provides direct access to the internal
byte[]
.- Author:
- AO Industries, Inc.
-
Field Summary
Fields inherited from class java.io.ByteArrayOutputStream
buf, count
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
Provides direct access to the internal byte[] to avoid unnecessary copying of the array.void
writeTo
(OutputStream out, int off, int len) Writes a portion of the contents of the buffer to another byte stream.void
writeTo
(RandomAccessFile raf) void
writeTo
(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
-
Constructor Details
-
AoByteArrayOutputStream
public AoByteArrayOutputStream() -
AoByteArrayOutputStream
public AoByteArrayOutputStream(int size)
-
-
Method Details
-
getInternalByteArray
public byte[] getInternalByteArray()Provides direct access to the internal byte[] to avoid unnecessary copying of the array. -
writeTo
Writes a portion of the contents of the buffer to another byte stream.- Throws:
IOException
-
writeTo
- Throws:
IOException
-
writeTo
- Throws:
IOException
-