public class NonCopyingByteArrayOutputStream extends ByteArrayOutputStream
ByteArrayOutputStream
directly
available as a ByteBuffer
.buf, count
Constructor and Description |
---|
NonCopyingByteArrayOutputStream(int size)
Creates a new byte array output stream, with a buffer capacity of the
specified size, in bytes.
|
Modifier and Type | Method and Description |
---|---|
ByteBuffer |
asByteBuffer()
Get the contents of this ByteArrayOutputStream wrapped as a ByteBuffer.
|
close, reset, size, toByteArray, toString, toString, toString, write, write, writeTo
flush, write
public NonCopyingByteArrayOutputStream(int size)
size
- the initial sizeIllegalArgumentException
- if size is negativepublic ByteBuffer asByteBuffer()
Copyright © 2009–2022 The Apache Software Foundation. All rights reserved.