Class ByteBufferInputStream

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

    public class ByteBufferInputStream
    extends java.io.InputStream
    Simple input stream backed by a byte buffer.
    • Constructor Summary

      Constructors 
      Constructor Description
      ByteBufferInputStream​(java.nio.ByteBuffer buffer)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void mark​(int i)  
      boolean markSupported()  
      int read()  
      int read​(byte[] bytes)  
      int read​(byte[] bytes, int off, int len)  
      void reset()  
      • Methods inherited from class java.io.InputStream

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

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

      • ByteBufferInputStream

        public ByteBufferInputStream​(java.nio.ByteBuffer buffer)
    • Method Detail

      • read

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

        public int read​(@Nonnull
                        byte[] bytes)
                 throws java.io.IOException
        Overrides:
        read in class java.io.InputStream
        Throws:
        java.io.IOException
      • read

        public int read​(@Nonnull
                        byte[] bytes,
                        int off,
                        int len)
                 throws java.io.IOException
        Overrides:
        read in class java.io.InputStream
        Throws:
        java.io.IOException
      • markSupported

        public boolean markSupported()
        Overrides:
        markSupported in class java.io.InputStream
      • mark

        public void mark​(int i)
        Overrides:
        mark in class java.io.InputStream
      • reset

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