public void seek(long seekBytes) throws FileNotFoundException, IOException, InterruptedException {
  try {
    if (fileInput != null) {
      fileInput.close();
    }
    fileInput=new FileInputStream(file);
    fileChannel=fileInput.getChannel();
    fileChannel.position(seekBytes);
  }
 catch (  ClosedByInterruptException e) {
    throw new InterruptedException();
  }
  bufferedInput=new BufferedInputStream(fileInput,size);
  dataInput=new DataInputStream(bufferedInput);
  offset=seekBytes;
  markOffset=-1;
  available();
}

public void seek ( long seekBytes ) throws FileNotFoundException , IOException , InterruptedException { try { if ( fileInput != null ) { fileInput . close ( ) ; } fileInput = new FileInputStream ( file ) ; fileChannel = fileInput . getChannel ( ) ; fileChannel . position ( seekBytes ) ; } catch ( ClosedByInterruptException e ) { throw new InterruptedException ( ) ; } bufferedInput = new BufferedInputStream ( fileInput , size ) ; dataInput = new DataInputStream ( bufferedInput ) ; offset = seekBytes ; markOffset = - 1 ; available ( ) ; }
seek to a specific offset in the file .
