Class C4BlobReadStream

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public class C4BlobReadStream
    extends C4NativePeer
    An open stream for reading data from a blob.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Closes a read-stream.
      long getLength()
      Returns the exact length in bytes of the stream.
      int read​(byte[] b, int offset, long maxBytesToRead)  
      byte[] read​(long maxBytesToRead)
      Reads from an open stream.
      void seek​(long position)
      Moves to a random location in the stream; the next c4stream_read call will read from that location.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • read

        @NonNull
        public byte[] read​(long maxBytesToRead)
                    throws LiteCoreException
        Reads from an open stream.
        Parameters:
        maxBytesToRead - The maximum number of bytes to read to the buffer
        Throws:
        LiteCoreException
      • seek

        public void seek​(long position)
                  throws LiteCoreException
        Moves to a random location in the stream; the next c4stream_read call will read from that location.
        Throws:
        LiteCoreException
      • close

        @CallSuper
        public void close()
        Closes a read-stream.