Package org.jets3t.service.io
Class SegmentedRepeatableFileInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.jets3t.service.io.RepeatableFileInputStream
-
- org.jets3t.service.io.SegmentedRepeatableFileInputStream
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,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.- Author:
- James Murty
-
-
Constructor Summary
Constructors Constructor Description SegmentedRepeatableFileInputStream(File file, long offset, long segmentLength)
Creates a repeatable input stream based on a file.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
nullInputStream, read, readAllBytes, readNBytes, readNBytes, transferTo
-
-
-
-
Constructor Detail
-
SegmentedRepeatableFileInputStream
public SegmentedRepeatableFileInputStream(File file, long offset, long segmentLength) throws IOException
Creates a repeatable input stream based on a file.- Parameters:
file
-- Throws:
IOException
-
-
Method Detail
-
available
public int available() throws IOException
- Overrides:
available
in classRepeatableFileInputStream
- Throws:
IOException
-
read
public int read() throws IOException
- Overrides:
read
in classRepeatableFileInputStream
- Throws:
IOException
-
read
public int read(byte[] bytes, int off, int len) throws IOException
- Overrides:
read
in classRepeatableFileInputStream
- Throws:
IOException
-
-