ByteArrayOutputStream
Class ByteArrayOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.ByteArrayOutputStream
- All Implemented Interfaces:
- Closeable, Flushable, AutoCloseable
public class ByteArrayOutputStream extends OutputStream
This class implements an output stream in which the data is written into a byte array. The buffer automatically grows as data is written to it. The data can be retrieved using toByteArray()
and toString()
.
Closing a