Class NonCopyingByteArrayOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.ByteArrayOutputStream
-
- io.quarkus.opentelemetry.runtime.exporter.otlp.NonCopyingByteArrayOutputStream
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
final class NonCopyingByteArrayOutputStream extends ByteArrayOutputStream
Used when we know that the stream will never be used again, therefore we can skip copying the data WARNING: This should only be used when we know that we will write at least this many bytes to the stream
-
-
Field Summary
-
Fields inherited from class java.io.ByteArrayOutputStream
buf, count
-
-
Constructor Summary
Constructors Constructor Description NonCopyingByteArrayOutputStream(int size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]toByteArray()-
Methods inherited from class java.io.ByteArrayOutputStream
close, reset, size, toString, toString, toString, toString, write, write, writeBytes, writeTo
-
Methods inherited from class java.io.OutputStream
flush, nullOutputStream, write
-
-
-
-
Method Detail
-
toByteArray
public byte[] toByteArray()
- Overrides:
toByteArrayin classByteArrayOutputStream
-
-