open class ResizableByteArrayOutputStream : ByteArrayOutputStream
An extension of java.io.ByteArrayOutputStream that:
org.springframework.util.ResizableByteArrayOutputStream#grow(int) and org.springframework.util.ResizableByteArrayOutputStream#resize(int) methods to get more control over the size of the internal bufferAs of 4.2, this class has been superseded by FastByteArrayOutputStream for Spring's internal use where no assignability to ByteArrayOutputStream is needed (since FastByteArrayOutputStream is more efficient with buffer resize management but doesn't extend the standard ByteArrayOutputStream).
Author
Brian Clozel
Author
Juergen Hoeller
Since
4.0.3
See Also
#resizeFastByteArrayOutputStream
ResizableByteArrayOutputStream()
Create a new ResizableByteArrayOutputStream(initialCapacity: Int)
Create a new |
open fun capacity(): Int
Return the current size of this stream's internal buffer. |
|
open fun grow(additionalCapacity: Int): Unit
Grow the internal buffer size. |
|
open fun resize(targetCapacity: Int): Unit
Resize the internal buffer size to a specified capacity. |