Class MultiByteBufferInputStream

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

    public class MultiByteBufferInputStream
    extends java.io.InputStream
    Joins a list of byte buffers to make them appear as a single input stream. The reset method is supported, and always resets to restart the stream at the beginning of the first buffer, although markSupported() returns false for this class.
    • Constructor Summary

      Constructors 
      Constructor Description
      MultiByteBufferInputStream​(java.util.List<java.nio.ByteBuffer> initialBuffers)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(java.util.List<java.nio.ByteBuffer> additionalBuffers)  
      int read()  
      void reset()  
      • Methods inherited from class java.io.InputStream

        available, close, mark, markSupported, nullInputStream, read, read, readAllBytes, readNBytes, readNBytes, skip, transferTo
      • Methods inherited from class java.lang.Object

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

      • MultiByteBufferInputStream

        public MultiByteBufferInputStream​(java.util.List<java.nio.ByteBuffer> initialBuffers)
    • Method Detail

      • add

        public void add​(java.util.List<java.nio.ByteBuffer> additionalBuffers)
      • read

        public int read()
                 throws java.io.IOException
        Specified by:
        read in class java.io.InputStream
        Throws:
        java.io.IOException
      • reset

        public void reset()
        Overrides:
        reset in class java.io.InputStream