org.apache.nutch.fs
Class NFSInputStream

java.lang.Object
  extended byjava.io.InputStream
      extended byorg.apache.nutch.fs.NFSInputStream

public abstract class NFSInputStream
extends InputStream

NFSInputStream is a generic old InputStream with a little bit of RAF-style seek ability.

Author:
Mike Cafarella

Constructor Summary
NFSInputStream()
           
 
Method Summary
abstract  long getPos()
          Return the current offset from the start of the file
abstract  void seek(long pos)
          Seek to the given offset from the start of the file.
 
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, read, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NFSInputStream

public NFSInputStream()
Method Detail

seek

public abstract void seek(long pos)
                   throws IOException
Seek to the given offset from the start of the file. The next read() will be from that location. Can't seek past the end of the file.

Throws:
IOException

getPos

public abstract long getPos()
                     throws IOException
Return the current offset from the start of the file

Throws:
IOException


Copyright © 2006 The Apache Software Foundation