com.ibm.as400.access

Class LineDataRecordWriter

  • java.lang.Object
    • com.ibm.as400.access.LineDataRecordWriter


  • public class LineDataRecordWriter
    extends java.lang.Object
    Writes a record in line data format (with the name of the record format inserted into positions 1-10 of the line data), translating characters into bytes of the specified CCSID. The line data is written to an OutputStream.
    See Also:
    OutputStream
    • Constructor Summary

      Constructors 
      Constructor and Description
      LineDataRecordWriter(java.io.OutputStream out, AS400 system)
      Constructs a LineDataRecordWriter.
      LineDataRecordWriter(java.io.OutputStream out, int ccsid, AS400 system)
      Constructs a LineDataRecordWriter.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      int getCcsid()
      Gets the CCSID used for this writer.
      java.lang.String getEncoding()
      Gets the name of the encoding being used by this LineDataRecordWriter.
      void writeRecord(Record record)
      Writes the record data, in line data format, to an OutputStream.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LineDataRecordWriter

        public LineDataRecordWriter(java.io.OutputStream out,
                            AS400 system)
                             throws java.io.UnsupportedEncodingException
        Constructs a LineDataRecordWriter. The target CCSID defaults to the CCSID of the system.
        Parameters:
        out - An OutputStream.
        system - The system.
        Throws:
        java.io.UnsupportedEncodingException - If ccsid is not valid.
      • LineDataRecordWriter

        public LineDataRecordWriter(java.io.OutputStream out,
                            int ccsid,
                            AS400 system)
                             throws java.io.UnsupportedEncodingException
        Constructs a LineDataRecordWriter.
        Parameters:
        out - An OutputStream.
        ccsid - The name of the target CCSID to be used.
        system - The system.
        Throws:
        java.io.UnsupportedEncodingException - If ccsid is not valid.