SQLite
Class BlobR

java.lang.Object
  extended byjava.io.InputStream
      extended bySQLite.BlobR

class BlobR
extends InputStream

Internal class implementing java.io.InputStream on SQLite 3.4.0 incremental blob I/O interface.


Field Summary
private  Blob blob
          Blob instance
private  int pos
          Read position, file pointer.
 
Fields inherited from class java.io.InputStream
 
Constructor Summary
(package private) BlobR(Blob blob)
          Contruct InputStream from blob instance.
 
Method Summary
 int available()
          Return number of available bytes for reading.
 void close()
          Close this blob InputStream.
 void mark(int limit)
          Mark method; dummy to satisfy InputStream class.
 boolean markSupported()
          Mark support; not for this class.
 int read()
          Read single byte from blob.
 int read(byte[] b)
          Read byte array from blob.
 int read(byte[] b, int off, int len)
          Read slice of byte array from blob.
 void reset()
          Reset method; dummy to satisfy InputStream class.
 long skip(long n)
          Skip over blob data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

blob

private Blob blob
Blob instance


pos

private int pos
Read position, file pointer.

Constructor Detail

BlobR

BlobR(Blob blob)
Contruct InputStream from blob instance.

Parameters:
blob - blob to make input stream from
Method Detail

available

public int available()
              throws IOException
Return number of available bytes for reading.

Returns:
available input bytes
Throws:
IOException - on I/O error

close

public void close()
           throws IOException
Close this blob InputStream.

Throws:
IOException - on I/O error

mark

public void mark(int limit)
Mark method; dummy to satisfy InputStream class.


markSupported

public boolean markSupported()
Mark support; not for this class.

Returns:
always false

read

public int read()
         throws IOException
Read single byte from blob.

Returns:
byte read
Throws:
IOException - on I/O error

read

public int read(byte[] b)
         throws IOException
Read byte array from blob.

Parameters:
b - byte array to be filled
Returns:
number of bytes read
Throws:
IOException - on I/O error

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Read slice of byte array from blob.

Parameters:
b - byte array to be filled
off - offset into byte array
len - length to be read
Returns:
number of bytes read
Throws:
IOException - on I/O error

reset

public void reset()
           throws IOException
Reset method; dummy to satisfy InputStream class.

Throws:
IOException - on I/O error

skip

public long skip(long n)
          throws IOException
Skip over blob data.

Parameters:
n - number of bytes to skip
Throws:
IOException - on I/O error


Contact: Christian Werner