org.jets3t.service.io
Class SegmentedRepeatableFileInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by org.jets3t.service.io.RepeatableFileInputStream
          extended by org.jets3t.service.io.SegmentedRepeatableFileInputStream
All Implemented Interfaces:
java.io.Closeable, InputStreamWrapper

public class SegmentedRepeatableFileInputStream
extends RepeatableFileInputStream

A repeatable input stream for files. This input stream can be repeated an unlimited number of times, without any limitation on when a repeat can occur.


Field Summary
protected  long offset
           
protected  long segmentLength
           
 
Fields inherited from class org.jets3t.service.io.RepeatableFileInputStream
bytesReadPastMarkPoint, file, fis, markPoint
 
Constructor Summary
SegmentedRepeatableFileInputStream(java.io.File file, long offset, long segmentLength)
          Creates a repeatable input stream based on a file.
 
Method Summary
 int available()
           
 int read()
           
 int read(byte[] bytes, int off, int len)
           
 
Methods inherited from class org.jets3t.service.io.RepeatableFileInputStream
close, getWrappedInputStream, mark, markSupported, reset, skip
 
Methods inherited from class java.io.InputStream
read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

offset

protected long offset

segmentLength

protected long segmentLength
Constructor Detail

SegmentedRepeatableFileInputStream

public SegmentedRepeatableFileInputStream(java.io.File file,
                                          long offset,
                                          long segmentLength)
                                   throws java.io.IOException
Creates a repeatable input stream based on a file.

Parameters:
file -
Throws:
java.io.IOException
Method Detail

available

public int available()
              throws java.io.IOException
Overrides:
available in class RepeatableFileInputStream
Throws:
java.io.IOException

read

public int read()
         throws java.io.IOException
Overrides:
read in class RepeatableFileInputStream
Throws:
java.io.IOException

read

public int read(byte[] bytes,
                int off,
                int len)
         throws java.io.IOException
Overrides:
read in class RepeatableFileInputStream
Throws:
java.io.IOException