Class BufferedOffloadStream

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

    public class BufferedOffloadStream
    extends java.io.InputStream
    • Constructor Summary

      Constructors 
      Constructor Description
      BufferedOffloadStream​(int blockSize, java.util.List<org.apache.bookkeeper.mledger.Entry> entries, long ledgerId, long beginEntryId)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static int calculateBlockSize​(int streamingBlockSize, int entryCount, int entrySize)  
      void close()  
      long getBeginEntryId()  
      long getBlockSize()  
      long getEndEntryId()  
      long getLedgerId()  
      int read()  
      • Methods inherited from class java.io.InputStream

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

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

      • BufferedOffloadStream

        public BufferedOffloadStream​(int blockSize,
                                     java.util.List<org.apache.bookkeeper.mledger.Entry> entries,
                                     long ledgerId,
                                     long beginEntryId)
    • Method Detail

      • getEndEntryId

        public long getEndEntryId()
      • getLedgerId

        public long getLedgerId()
      • getBeginEntryId

        public long getBeginEntryId()
      • getBlockSize

        public long getBlockSize()
      • read

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

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class java.io.InputStream
        Throws:
        java.io.IOException
      • calculateBlockSize

        public static int calculateBlockSize​(int streamingBlockSize,
                                             int entryCount,
                                             int entrySize)