Seekable (Hadoop 1.2.1 API)
Date: 2013-07-22

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.hadoop.fs
Interface Seekable

All Known Implementing Classes:
  BlockDecompressorStream, BufferedFSInputStream, CompressionInputStream, DecompressorStream, FSDataInputStream, FSInputChecker, FSInputStream, FTPInputStream, SplitCompressionInputStream

    public interface Seekable

Stream that permits seeking.

Method Summary
`long` | `getPos()` Return the current offset from the start of the file
`void` | `seek(long pos)` Seek to the given offset from the start of the file.
`boolean` | `seekToNewSource(long targetPos)` Seeks a different copy of the data.

Method Detail

### seek

    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

    long getPos()
                throws IOException

  Return the current offset from the start of the file

  Throws:
    `IOException`

### seekToNewSource

    boolean seekToNewSource(long targetPos)
                            throws IOException

  Seeks a different copy of the data. Returns true if found a new source, false otherwise.

  Throws:
    `IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 The Apache Software Foundation