org.apache.avro.file
Interface SeekableInput

All Superinterfaces:
Closeable
All Known Implementing Classes:
FsInput, SeekableFileInput

public interface SeekableInput
extends Closeable

An InputStream that supports seek and tell.


Method Summary
 long length()
          Return the length of the file.
 int read(byte[] b, int off, int len)
          Equivalent to InputStream.read(byte[],int,int).
 void seek(long p)
          Set the position for the next read().
 long tell()
          Return the position of the next read().
 
Methods inherited from interface java.io.Closeable
close
 

Method Detail

seek

void seek(long p)
          throws IOException
Set the position for the next read().

Throws:
IOException

tell

long tell()
          throws IOException
Return the position of the next read().

Throws:
IOException

length

long length()
            throws IOException
Return the length of the file.

Throws:
IOException

read

int read(byte[] b,
         int off,
         int len)
         throws IOException
Equivalent to InputStream.read(byte[],int,int).

Throws:
IOException


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.