Class ExposedByteArrayInputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    @Internal
    public class ExposedByteArrayInputStream
    extends java.io.ByteArrayInputStream
    ByteArrayInputStream that allows accessing the entire internal buffer without copying.
    • Field Summary

      • Fields inherited from class java.io.ByteArrayInputStream

        buf, count, mark, pos
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      byte[] readAll()
      Read all remaining bytes.
      • Methods inherited from class java.io.ByteArrayInputStream

        available, mark, markSupported, read, read, readAllBytes, readNBytes, reset, skip, transferTo
      • Methods inherited from class java.io.InputStream

        nullInputStream, read, readNBytes
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ExposedByteArrayInputStream

        public ExposedByteArrayInputStream​(byte[] buf)
    • Method Detail

      • readAll

        public byte[] readAll()
                       throws java.io.IOException
        Read all remaining bytes.
        Throws:
        java.io.IOException
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class java.io.ByteArrayInputStream