All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.as400.access.SCS5553Writer

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

public class SCS5553Writer
extends SCS5224Writer
The SCS5553Writer class writes an SCS 5553 data stream to an output stream, translating characters into bytes of the specified CCSID. SCS5553Writer extends the SCS5224Writer and adds support for presentation of control characters, character rotation, grid lines, and font scaling. The 5553 is a DBCS data stream.

See Also:
SCS5224Writer

Variable Index

 o CHARACTER_NORMAL
Constant for normal character rotation.
 o CHARACTER_ROTATED
Constant for 270-degree character rotation.
 o SCALE_DOUBLE_HORIZONTAL
Constant for double horizontal font scaling.
 o SCALE_REGULAR
Constant for regular font scaling.
 o SETCCP_BLANK_CODE
Constant for SO/SI are printed as A/N/K blank code (default)
 o SETCCP_NO_PRINT
Constant for all control characters take no printing positions
 o SETCCP_SI_BLANK
Constant for SO takes no position, SI takes 2 A/N/K blanks

Constructor Index

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

Method Index

 o printHorizontalGridLine(double, double)
Prints a horizontal grid line at the current line.
 o setCharacterRotation(int)
Sets character rotation.
 o setControlCharPresentation(int)
Defines the action taken by the SI/SO characters.
 o setFontScaling(int)
Sets font scaling.
 o startVerticalGridLines(double[])
Starts printing vertical grid lines at the specified positions.
 o stopVerticalGridLines()
Stops printing vertical grid lines.

Variables

 o CHARACTER_NORMAL
 public static final int CHARACTER_NORMAL
Constant for normal character rotation.

 o CHARACTER_ROTATED
 public static final int CHARACTER_ROTATED
Constant for 270-degree character rotation.

 o SCALE_DOUBLE_HORIZONTAL
 public static final int SCALE_DOUBLE_HORIZONTAL
Constant for double horizontal font scaling.

 o SCALE_REGULAR
 public static final int SCALE_REGULAR
Constant for regular font scaling.

 o SETCCP_NO_PRINT
 public static final int SETCCP_NO_PRINT
Constant for all control characters take no printing positions

 o SETCCP_BLANK_CODE
 public static final int SETCCP_BLANK_CODE
Constant for SO/SI are printed as A/N/K blank code (default)

 o SETCCP_SI_BLANK
 public static final int SETCCP_SI_BLANK
Constant for SO takes no position, SI takes 2 A/N/K blanks

Constructors

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

Constructs a SCS5553Writer. The default encoding will be used.

Parameters:
out - An OutputStream.
 o SCS5553Writer
 public SCS5553Writer(OutputStream out,
                      int ccsid) throws UnsupportedEncodingException
Note: SCS5553Writer() is deprecated. Replaced by SCS5553Writer(OutputStream, int, AS400). Any SCS5553Writer object that is created without specifying an AS400 system object on its constructor may not behave as expected in certain environments.

Constructs a SCS5553Writer.

Parameters:
out - An OutputStream.
ccsid - The name of the target CCSID to be used.
Throws: UnsupportedEncodingException
If ccsid is invalid.
 o SCS5553Writer
 public SCS5553Writer(OutputStream out,
                      int ccsid,
                      AS400 system) throws UnsupportedEncodingException
Constructs a SCS5553Writer.

Parameters:
out - An OutputStream.
ccsid - The name of the target CCSID to be used.
system - The system.
Throws: UnsupportedEncodingException
If ccsid is invalid.
 o SCS5553Writer
 public SCS5553Writer(OutputStream out,
                      String encoding) throws UnsupportedEncodingException
Note: SCS5553Writer() is deprecated. Replaced by SCS5553Writer(OutputStream, int, AS400). Any SCS5553Writer object that is created without specifying an AS400 system object on its constructor may not behave as expected in certain environments.

Constructs a SCS5553Writer.

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

Methods

 o printHorizontalGridLine
 public void printHorizontalGridLine(double start,
                                     double stop) throws IOException
Prints a horizontal grid line at the current line.

Parameters:
start - The absolute position in inches, from the left paper edge, to start the grid line.
stop - The absolute position in inches, from the left paper edge, to stop the grid line.
Throws: IOException
If an error occurs while communicating with the AS/400.
 o setCharacterRotation
 public void setCharacterRotation(int rotation) throws IOException
Sets character rotation. Characters can be rotated 270 degrees for vertical printing.

Parameters:
rotation - The value of character rotation. Valid values are CHARACTER_NORMAL and CHARACTER_ROTATED.
Throws: IOException
If an error occurs while communicating with the AS/400.
 o setControlCharPresentation
 public void setControlCharPresentation(int set) throws IOException
Defines the action taken by the SI/SO characters. These characters are either not printed at all or printed as spaces.

Parameters:
set - The parameter that defines the presentation option. Valid values are SETCCP_NO_PRINT, SETCCP_BLANK_CODE, and SETCCP_SI_BLANK.
Throws: IOException
If an error occurs while communicating with the AS/400.
 o setFontScaling
 public void setFontScaling(int scale) throws IOException
Sets font scaling. Allows doubling the horizontal size of the font. Applies to both A/N/K and IGC characters. Actual characters per inch is affected.

Parameters:
scale - The value of font scaling. Valid values are SCALE_REGULAR and SCALE_DOUBLE_HORIZONTAL.
Throws: IOException
If an error occurs while communicating with the AS/400.
 o startVerticalGridLines
 public void startVerticalGridLines(double positions[]) throws IOException
Starts printing vertical grid lines at the specified positions.

Parameters:
positions - An array of absolute positions in inches, from the left paper edge, to start a vertical grid line.
Throws: IOException
If an error occurs while communicating with the AS/400.
 o stopVerticalGridLines
 public void stopVerticalGridLines() throws IOException
Stops printing vertical grid lines.

Throws: IOException
If an error occurs while communicating with the AS/400.

All Packages  Class Hierarchy  This Package  Previous  Next  Index