Class BytesOutputStream

java.lang.Object
java.io.OutputStream
org.apache.solr.common.util.BytesOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public class BytesOutputStream extends OutputStream
  • Field Details

    • buf

      protected byte[] buf
    • sz

      protected int sz
  • Constructor Details

    • BytesOutputStream

      public BytesOutputStream()
    • BytesOutputStream

      public BytesOutputStream(int size)
  • Method Details

    • toBytes

      public byte[] toBytes()
    • bytes

      public BytesOutputStream.Bytes bytes()
    • inputStream

      public InputStream inputStream()
    • write

      public void write(int b)
      Write a byte to the stream.
      Specified by:
      write in class OutputStream
    • write

      public void write(byte[] b, int off, int len)
      Overrides:
      write in class OutputStream
    • writeBytes

      public void writeBytes(byte[] b)
    • reset

      public void reset()
    • size

      public int size()
    • toString

      public String toString(String charset)
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class OutputStream