org.apache.hadoop.fs
Interface Seekable

All Known Implementing Classes:
BlockDecompressorStream, CompressionInputStream, DecompressorStream, FSDataInputStream, SplitCompressionInputStream

@InterfaceAudience.Public
@InterfaceStability.Evolving
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.
 

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


Copyright © 2014 Apache Software Foundation. All Rights Reserved.