All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.as400.access.SCS5224Writer

java.lang.Object
   |
   +----java.io.Writer
           |
           +----java.io.OutputStreamWriter
                   |
                   +----com.ibm.as400.access.SCS5256Writer
                           |
                           +----com.ibm.as400.access.SCS5224Writer

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

Constructor Index

 o SCS5224Writer(OutputStream)
Constructs a SCS5224Writer. Deprecated.
 o SCS5224Writer(OutputStream, int)
Constructs a SCS5224Writer. Deprecated.
 o SCS5224Writer(OutputStream, int, AS400)
Constructs a SCS5224Writer.
 o SCS5224Writer(OutputStream, String)
Constructs a SCS5224Writer. Deprecated.

Method Index

 o setCPI(int)
Sets characters per inch.
 o setLPI(int)
Sets lines per inch.

Constructors

 o SCS5224Writer
 public SCS5224Writer(OutputStream out)
Note: SCS5224Writer() is 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.
 o SCS5224Writer
 public SCS5224Writer(OutputStream out,
                      int ccsid) throws UnsupportedEncodingException
Note: SCS5224Writer() is 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.
 o 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.
 o SCS5224Writer
 public SCS5224Writer(OutputStream out,
                      String encoding) throws UnsupportedEncodingException
Note: SCS5224Writer() is 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.

Methods

 o 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 AS/400.
 o 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 AS/400.

All Packages  Class Hierarchy  This Package  Previous  Next  Index