1 /* Copyright (c) 2004 The Nutch Organization. All rights reserved. */ 2 /* Use subject to the conditions in http://www.nutch.org/LICENSE.txt. */ 3 package net.nutch.fs; 4 5 import java.io.*; 6 7 /**************************************************************** 8 * NFSInputStream is a generic old InputStream with a little bit 9 * of RAF-style seek ability. 10 * 11 * @author Mike Cafarella 12 *****************************************************************/ 13 public abstract class NFSInputStream extends InputStream { 14 /** 15 * Seek to the given offset from the start of the file. 16 * The next read() will be from that location. Can't 17 * seek past the end of the file. 18 */ 19 public abstract void seek(long pos) throws IOException; 20 21 /** 22 * Return the current offset from the start of the file 23 */ 24 public abstract long getPos() throws IOException; 25 } 26