Package ipsk.io
Class EditInputStream
- java.lang.Object
-
- java.io.InputStream
-
- ipsk.io.FramedInputStream
-
- ipsk.io.FramedEditingInputStream
-
- ipsk.io.EditInputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class EditInputStream extends FramedEditingInputStream
This stream reads a segment of the underlying input stream.- Author:
- K.Jaensch, klausj@phonetik.uni-muenchen.de
-
-
Field Summary
-
Fields inherited from class ipsk.io.FramedEditingInputStream
is
-
Fields inherited from class ipsk.io.FramedInputStream
frameSize, frameSizeException
-
-
Constructor Summary
Constructors Constructor Description EditInputStream(java.io.InputStream is, int frameSize, long from, long length)
Creates editing InputStream.EditInputStream(java.io.InputStream is, long off, long length)
Creates editing InputStream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
available()
int
read(byte[] buf, int offset, int len)
long
skip(long n)
-
Methods inherited from class ipsk.io.FramedEditingInputStream
close
-
Methods inherited from class ipsk.io.FramedInputStream
read, read
-
-
-
-
Constructor Detail
-
EditInputStream
public EditInputStream(java.io.InputStream is, long off, long length)
Creates editing InputStream. Only the data bytes from the given position with the given length of the underlying InputStream are read. (the bytes from 'off' to 'off+length')- Parameters:
is
- the underlying (source) InputStreamoff
- read data starts from this frame positionlength
- read length frames
-
EditInputStream
public EditInputStream(java.io.InputStream is, int frameSize, long from, long length)
Creates editing InputStream. Only the data frames from the given position with the given length of the underlying InputStream are read. (the bytes from 'off * frameSize' to '(off+length) * frameSize')- Parameters:
is
- the underlying (source) InputStreamframeSize
- size of the data framesfrom
- read data starts from this frame positionlength
- read length frames
-
-
Method Detail
-
skip
public long skip(long n) throws java.io.IOException
- Overrides:
skip
in classjava.io.InputStream
- Throws:
java.io.IOException
-
read
public int read(byte[] buf, int offset, int len) throws java.io.IOException
- Specified by:
read
in classFramedInputStream
- Throws:
java.io.IOException
-
available
public int available() throws java.io.IOException
- Overrides:
available
in classjava.io.InputStream
- Throws:
java.io.IOException
-
-