|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
wt.wrmf.transport.SegmentedInputStream
SegmentedInputStream devides an input stream
into several segments, the size of each segment
is specified in the constructor.
Supported API: false
Extendable: false
Field Summary | |
private static String |
CLASSNAME
|
private InputStream |
is
|
private long[] |
localCount
|
private static String |
RESOURCE
|
private boolean |
segmentDone
|
private int |
segmentIndex
|
private long[] |
size
|
private long |
totalCount
|
private int |
totalSegments
|
Fields inherited from class java.io.InputStream |
|
Constructor Summary | |
SegmentedInputStream(InputStream is,
long length)
Devide the input stream into 2 segments: the first one will be of length "length"; the second one will be the rest of the stream. |
|
SegmentedInputStream(InputStream is,
long[] sizeArray)
Devide the input stream into (sizeArray.length+1) segments with length specified by sizeArray[]. |
Method Summary | |
void |
close()
|
InputStream |
getNextSegment()
Supported API: false |
InputStream |
getSelectedSegment(int index)
The index begins at 0. |
int |
read()
Supported API: false |
int |
read(byte[] buf)
Supported API: false |
int |
read(byte[] buf,
int off,
int len)
Supported API: false |
private int |
read0(byte[] buf,
int off,
int len)
|
long |
skip(long n)
Skip exactly n bytes. |
Methods inherited from class java.io.InputStream |
available, mark, markSupported, reset |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
private InputStream is
private long[] size
private long totalCount
private long[] localCount
private int segmentIndex
private int totalSegments
private boolean segmentDone
Constructor Detail |
public SegmentedInputStream(InputStream is, long length)
is
- length
- public SegmentedInputStream(InputStream is, long[] sizeArray)
is
- sizeArray
- Method Detail |
public InputStream getNextSegment() throws IOException
IOException
public InputStream getSelectedSegment(int index) throws IOException
index
-
IOException
public int read() throws IOException
IOException
public int read(byte[] buf, int off, int len) throws IOException
buf
- off
- len
-
IOException
public int read(byte[] buf) throws IOException
buf
-
IOException
public long skip(long n) throws IOException
n
-
IOException
private int read0(byte[] buf, int off, int len) throws IOException
IOException
public void close() throws IOException
IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |