Module ibm.jzos
Package com.ibm.jzos

Class RDWOutputRecordStream

java.lang.Object
com.ibm.jzos.RDWOutputRecordStream

public class RDWOutputRecordStream extends Object
This 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
    Description
    Construct an instance of RDWOutputRecordStream.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Close the underlying OutputStream
    void
    write(byte[] bytes)
    Write the supplied bytes to the underlying OutputStream preceded by a 4 byte RDW.
    void
    write(byte[] bytes, int offset, int length)
    Write the supplied bytes to the underlying OutputStream preceded by a 4 byte RDW.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RDWOutputRecordStream

      public RDWOutputRecordStream(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 Details

    • close

      public void close() throws IOException
      Close the underlying OutputStream
      Throws:
      IOException
    • write

      public void write(byte[] bytes) throws IOException
      Write the supplied bytes to the underlying OutputStream preceded by a 4 byte RDW.
      Parameters:
      bytes -
      Throws:
      IOException
    • write

      public void write(byte[] bytes, int offset, int length) throws IOException
      Write the supplied bytes to the underlying OutputStream preceded by a 4 byte RDW.
      Parameters:
      bytes -
      Throws:
      IOException