Package net.i2p.util

Class ByteArrayStream

All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public class ByteArrayStream extends ByteArrayOutputStream
OutputStream to InputStream adapter. Zero-copy where possible. Unsynchronized. This is NOT a Pipe. Do NOT reset after writing.
Since:
0.9.48
  • Constructor Details

    • ByteArrayStream

      public ByteArrayStream()
    • ByteArrayStream

      public ByteArrayStream(int size)
      Parameters:
      size - if accurate, toByteArray() will be zero-copy
  • Method Details