okapi.util
Class OkapiStoreInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by okapi.util.OkapiStoreInputStream
All Implemented Interfaces:
java.io.Closeable

public class OkapiStoreInputStream
extends java.io.InputStream

InputStream for OkapiStore

Version:
$Revision: 31044 $, $Date: 2008-09-02 17:08:01 -0400 (Tue, 02 Sep 2008) $
Author:
MIT Stellar team

Constructor Summary
OkapiStoreInputStream(OkapiStore store)
          Constructor OkapiStoreInputStream
 
Method Summary
 int available()
          Returns the number of bytes that can be read (or skipped over) from this input stream without blocking by the next caller of a method for this input stream.
 void close()
          Closes this input stream and releases any system resources associated with the stream.
 int read()
          Reads the next byte of data from the input stream.
 int read(byte[] b)
          Reads some number of bytes from the input stream and stores them into the buffer array b.
 int read(byte[] b, int off, int len)
          Reads up to len bytes of data from the input stream into an array of bytes.
 long skip(long n)
          Skips over and discards n bytes of data from this input stream.
 
Methods inherited from class java.io.InputStream
mark, markSupported, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OkapiStoreInputStream

public OkapiStoreInputStream(OkapiStore store)
                      throws java.io.FileNotFoundException
Constructor OkapiStoreInputStream

Parameters:
store -
Throws:
java.io.FileNotFoundException
Method Detail

read

public int read()
         throws java.io.IOException
Reads the next byte of data from the input stream.

Specified by:
read in class java.io.InputStream
Throws:
java.io.IOException

read

public int read(byte[] b,
                int off,
                int len)
         throws java.io.IOException
Reads up to len bytes of data from the input stream into an array of bytes.

Overrides:
read in class java.io.InputStream
Throws:
java.io.IOException

read

public int read(byte[] b)
         throws java.io.IOException
Reads some number of bytes from the input stream and stores them into the buffer array b.

Overrides:
read in class java.io.InputStream
Throws:
java.io.IOException

skip

public long skip(long n)
          throws java.io.IOException
Skips over and discards n bytes of data from this input stream.

Overrides:
skip in class java.io.InputStream
Throws:
java.io.IOException

available

public int available()
              throws java.io.IOException
Returns the number of bytes that can be read (or skipped over) from this input stream without blocking by the next caller of a method for this input stream.

Overrides:
available in class java.io.InputStream
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Closes this input stream and releases any system resources associated with the stream.

Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.InputStream
Throws:
java.io.IOException


Copyright ? 2001-2009 MIT. All Rights Reserved.