com.ibm.jzos
Class RDWOutputRecordStream
- java.lang.Object
-
- com.ibm.jzos.RDWOutputRecordStream
-
public class RDWOutputRecordStream extends java.lang.ObjectThis class is a wrapper that writes RDW (Record Descriptor Word) delineated records to an OutputStream.For example usage, see the sample class:
com.ibm.jzos.sample.dfsort.DfSortVariableJavaToDataset- Since:
- 2.1.0
-
-
Constructor Summary
Constructors Constructor and Description RDWOutputRecordStream(java.io.OutputStream os)Construct an instance of RDWOutputRecordStream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidclose()Close the underlying OutputStreamvoidwrite(byte[] bytes)Write the supplied bytes to the underlying OutputStream preceded by a 4 byte RDW.voidwrite(byte[] bytes, int offset, int length)Write the supplied bytes to the underlying OutputStream preceded by a 4 byte RDW.
-
-
-
Constructor Detail
-
RDWOutputRecordStream
public RDWOutputRecordStream(java.io.OutputStream os)
Construct an instance of RDWOutputRecordStream. Supplying a BufferedOutputStream will generally result in better performance.- Parameters:
os- the OutputStream that will receive the RDW delineated records
-
-
Method Detail
-
close
public void close() throws java.io.IOExceptionClose the underlying OutputStream- Throws:
java.io.IOException
-
write
public void write(byte[] bytes) throws java.io.IOExceptionWrite the supplied bytes to the underlying OutputStream preceded by a 4 byte RDW.- Parameters:
bytes-- Throws:
java.io.IOException
-
write
public void write(byte[] bytes, int offset, int length) throws java.io.IOExceptionWrite the supplied bytes to the underlying OutputStream preceded by a 4 byte RDW.- Parameters:
bytes-- Throws:
java.io.IOException
-
-