com.ibm.as400.access
Class SCS5224Writer

java.lang.Object
  extended by java.io.Writer
      extended by java.io.OutputStreamWriter
          extended by com.ibm.as400.access.SCS5256Writer
              extended by com.ibm.as400.access.SCS5224Writer
All Implemented Interfaces:
Closeable, Flushable, Appendable
Direct Known Subclasses:
SCS5219Writer, SCS5553Writer

public class SCS5224Writer
extends SCS5256Writer

The SCS5224Writer class writes an SCS 5224 data stream to an output stream, translating characters into bytes of the specified CCSID. SCS5224Writer extends the SCS5256Writer and adds support for setting the characters per inch (CPI) and lines per inch (LPI).

See Also:
SCS5256Writer

Field Summary
Modifier and Type Field and Description
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
Constructor and Description
SCS5224Writer(OutputStream out)
          Deprecated. Replaced by SCS5224Writer(OutputStream, int, AS400). Any SCS5224Writer object that is created without specifying an AS400 system object on its constructor may not behave as expected in certain environments.
SCS5224Writer(OutputStream out, int ccsid)
          Deprecated. Replaced by SCS5224Writer(OutputStream, int, AS400). Any SCS5224Writer object that is created without specifying an AS400 system object on its constructor may not behave as expected in certain environments.
SCS5224Writer(OutputStream out, int ccsid, AS400 system)
          Constructs a SCS5224Writer.
SCS5224Writer(OutputStream out, String encoding)
          Deprecated. Replaced by SCS5224Writer(OutputStream, int, AS400). Any SCS5224Writer object that is created without specifying an AS400 system object on its constructor may not behave as expected in certain environments.
 
Method Summary
Modifier and Type Method and Description
 void setCPI(int cpi)
          Sets characters per inch.
 void setLPI(int lpi)
          Sets lines per inch.
 
Methods inherited from class com.ibm.as400.access.SCS5256Writer
absoluteHorizontalPosition, absoluteVerticalPosition, carriageReturn, close, endPage, flush, getEncoding, lineFeed, newLine, relativeHorizontalPosition, relativeVerticalPosition, setHorizontalFormat, setVerticalFormat, write, write, write, write
 
Methods inherited from class java.io.Writer
append, append, append, append, append, append, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SCS5224Writer

public SCS5224Writer(OutputStream out)
Deprecated. Replaced by SCS5224Writer(OutputStream, int, AS400). Any SCS5224Writer object that is created without specifying an AS400 system object on its constructor may not behave as expected in certain environments.

Constructs a SCS5224Writer. The default encoding will be used.

Parameters:
out - An OutputStream.

SCS5224Writer

public SCS5224Writer(OutputStream out,
                     int ccsid)
              throws UnsupportedEncodingException
Deprecated. Replaced by SCS5224Writer(OutputStream, int, AS400). Any SCS5224Writer object that is created without specifying an AS400 system object on its constructor may not behave as expected in certain environments.

Constructs a SCS5224Writer.

Parameters:
out - An OutputStream.
ccsid - The name of the target CCSID to be used.
Throws:
UnsupportedEncodingException - If ccsid is invalid.

SCS5224Writer

public SCS5224Writer(OutputStream out,
                     int ccsid,
                     AS400 system)
              throws UnsupportedEncodingException
Constructs a SCS5224Writer.

Parameters:
out - An OutputStream.
ccsid - The name of the target CCSID to be used.
system - The system.
Throws:
UnsupportedEncodingException - If ccsid is invalid.

SCS5224Writer

public SCS5224Writer(OutputStream out,
                     String encoding)
              throws UnsupportedEncodingException
Deprecated. Replaced by SCS5224Writer(OutputStream, int, AS400). Any SCS5224Writer object that is created without specifying an AS400 system object on its constructor may not behave as expected in certain environments.

Constructs a SCS5224Writer.

Parameters:
out - An OutputStream.
encoding - The name of the target encoding to be used.
Throws:
UnsupportedEncodingException - If encoding is invalid.
Method Detail

setCPI

public void setCPI(int cpi)
            throws IOException
Sets characters per inch. All following text will be in the set pitch.

Parameters:
cpi - The characters per inch. Valid values are 10 and 15.
Throws:
IOException - If an error occurs while communicating with the system.

setLPI

public void setLPI(int lpi)
            throws IOException
Sets lines per inch. All following lines will be in the set lines per inch.

Parameters:
lpi - The lines per inch. Valid values are 4, 6, 8, 9, and 12.
Throws:
IOException - If an error occurs while communicating with the system.