| java.lang.Object | |||
| ↳ | java.io.OutputStream | ||
| ↳ | java.io.ByteArrayOutputStream | ||
| ↳ | com.pnfsoftware.jeb.util.io.DirectByteArrayOutputStream | ||
Extend ByteArrayOutputStream to provide direct access to the underlying byte array. In
particular, this class is meant to circumvent the memory consumption issues of
toByteArray().
|
[Expand]
Inherited Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.io.ByteArrayOutputStream
| |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| DirectByteArrayOutputStream() | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| synchronized ByteBuffer |
getBytes()
Direct access to the underlying byte array.
| ||||||||||
| byte[] |
getRawBytes()
Direct access to the underlying byte array.
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.io.ByteArrayOutputStream
| |||||||||||
From class
java.io.OutputStream
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
java.io.Closeable
| |||||||||||
From interface
java.io.Flushable
| |||||||||||
From interface
java.lang.AutoCloseable
| |||||||||||
Direct access to the underlying byte array.
Direct access to the underlying byte array. This method is dangerous, but can be used instead
of the expensive toByteArray(). It should be used in combination with
size(). A safer, as efficient alternative, is getBytes().
size())