|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.jzos.RDWInputRecordStream
public class RDWInputRecordStream
This class is a wrapper that returns RDW delineated records from an InputStream.
For example usage, see the sample class:
com.ibm.jzos.sample.dfsort.DfSortVariableDatasetToJava
Constructor Summary | |
---|---|
RDWInputRecordStream(java.io.InputStream is)
Construct an instance of RDWInputRecordStream. |
Method Summary | |
---|---|
void |
close()
Close the underlying InputStream |
byte[] |
read()
Read the next record and return as a new byte array |
int |
read(byte[] bytes)
Read the next record into the supplied byte array. |
int |
read(byte[] bytes,
int offset)
Read the next record into the supplied byte array starting at offset. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RDWInputRecordStream(java.io.InputStream is)
is
- the InputStream containing RDW delineated recordsMethod Detail |
---|
public void close() throws java.io.IOException
java.io.IOException
public int read(byte[] bytes) throws java.io.IOException
bytes
- the byte[] to read the record into
java.io.IOException
- if the supplied byte[] is too small to hold the record
or if an exception occurs on the underlying InputStreampublic int read(byte[] bytes, int offset) throws java.io.IOException
bytes
- the byte[] to read the record into
java.io.IOException
- if the supplied byte[] is too small to hold the record
or if an exception occurs on the underlying InputStreampublic byte[] read() throws java.io.IOException
This method creates a new byte array for each record sized to match
the exact record length. For better performance, use read(byte[])
.
java.io.IOException
- if the supplied byte[] is too small to hold the record
or if an exception occurs on the underlying InputStream
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |