com.bankframe.services.devices.SlipPrinter
Class SlipPrinterProtocol

java.lang.Object
  extended byjava.io.OutputStream
      extended byjava.io.FilterOutputStream
          extended byjava.io.DataOutputStream
              extended bycom.bankframe.services.devices.MCADeviceProtocol
                  extended bycom.bankframe.services.devices.SlipPrinter.SlipPrinterProtocol
All Implemented Interfaces:
java.io.DataOutput, java.io.Serializable, SlipPrinterCodes

public class SlipPrinterProtocol
extends MCADeviceProtocol
implements SlipPrinterCodes, java.io.Serializable

This class produces messages and codes for sending to a slip-printer using the serial port output stream

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.bankframe.services.devices.SlipPrinter.SlipPrinterCodes
AddNExtraDotRows, CarriageReturn, ClearPrinter, CloseForm, FeedNDotRows, FeedNPrintLines, FullKnifeCut, GenerateTone, HorizontalTab, InitializePrinter, LineFeed, OpenFormSlipStation, PartialKnifeCut, Print, PrintEjectSlip, PrintFeedNMinimumUnits, ReturnHomeSlipStation, SetAbsoluteStartingPosition, SetColumn, SetHorizontalTabPositions, SetLineSpacingToNUnits, SetLineSpacingToOneSixteenth, SetmodeSlip, SetmodeSlipeject, SetmodeTimeout, SetSlipEjectLength
 
Constructor Summary
SlipPrinterProtocol(java.io.ByteArrayOutputStream buffer)
          Constructor
 
Method Summary
static byte[] addNExtraDotRows(int number)
          This method adds N ( where n = number) extra dot rows
static byte[] carriageReturn()
          This method creates a carriage return message
static byte[] clearPrinter()
          This method creates a clear printer message
static byte[] closeForm()
          This method creates a close form message
static byte[] feedNDotRows(int number)
          This method creates a feeds N (where N=number) dot rows message
static byte[] feedNPrintLines(int number)
          This method creates a feeds N (where N=number) print lines message
static byte[] fullKnifeCut()
          This method creates a Full knife cut message
static byte[] generateTone()
          This method creates a Generate Tone message
static byte[] horizontalTab()
          This method creates a Horizontal Tab message
static byte[] initializePrinter()
          This method creates a Initialize Printer message
static byte[] lineFeed()
          This method creates a Line Feed message
static byte[] openFormSlipStation()
          This method creates a Open Form Slip Station message
static byte[] partialKnifeCut()
          This method creates a Partial knife cut message
static byte[] print()
          This method creates a Print message
static byte[] print(java.lang.String theText)
          This method prints string message
static byte[] printEjectSlip()
          This method creates a Print Eject slip message
static byte[] printFeedNMinimumUnits(int units)
          This method creates a Print Feed N Minimum units message
static byte[] returnHomeSlipStation()
          This method creates a Return Home slip station message
static byte[] setAbsoluteStartingPosition(int n1, int n2)
          This method creates a Set absolute Starting position message
static byte[] setColumn(int column)
          This method creates a Set column message
static byte[] setHorizontalTabPositions(int[] tabs)
          This method creates a Set horizontal Tab Positions message
static byte[] setLineSpacingToNUnits(int units)
          This method creates a Set line spacing To N Units message
static byte[] setLineSpacingToOneSixteenth()
          This method creates a Set line spacing to one sixteenth message
static byte[] setmodeSlip()
          This method creates a Set mode slip message
static byte[] setmodeSlipeject()
          This method creates a Setmode Slip eject message
static byte[] setmodeTimeout()
          This method creates a Set mode timeout message
static byte[] setSlipEjectLength(int len)
          This method creates a Set slip eject length message
 
Methods inherited from class com.bankframe.services.devices.MCADeviceProtocol
dataToHexData, getHexString, internalbuffer
 
Methods inherited from class java.io.DataOutputStream
flush, size, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
 
Methods inherited from class java.io.FilterOutputStream
close, write
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.io.DataOutput
write
 

Constructor Detail

SlipPrinterProtocol

public SlipPrinterProtocol(java.io.ByteArrayOutputStream buffer)
Constructor

Parameters:
buffer - The byte array output buffer
Method Detail

addNExtraDotRows

public static byte[] addNExtraDotRows(int number)
                               throws java.io.IOException
This method adds N ( where n = number) extra dot rows

Parameters:
number - The number of rows to add
Returns:
The encoded request
Throws:
java.io.IOException - on error

carriageReturn

public static byte[] carriageReturn()
                             throws java.io.IOException
This method creates a carriage return message

Returns:
The encoded request
Throws:
java.io.IOException - on error

clearPrinter

public static byte[] clearPrinter()
                           throws java.io.IOException
This method creates a clear printer message

Returns:
The encoded request
Throws:
java.io.IOException - on error

closeForm

public static byte[] closeForm()
                        throws java.io.IOException
This method creates a close form message

Returns:
The encoded request
Throws:
java.io.IOException - on error

feedNDotRows

public static byte[] feedNDotRows(int number)
                           throws java.io.IOException
This method creates a feeds N (where N=number) dot rows message

Parameters:
number - The number of rows
Returns:
The encoded request
Throws:
java.io.IOException - on error

feedNPrintLines

public static byte[] feedNPrintLines(int number)
                              throws java.io.IOException
This method creates a feeds N (where N=number) print lines message

Parameters:
number - The number of lines
Returns:
The encoded request
Throws:
java.io.IOException - on error

fullKnifeCut

public static byte[] fullKnifeCut()
                           throws java.io.IOException
This method creates a Full knife cut message

Returns:
The encoded request
Throws:
java.io.IOException - on error

generateTone

public static byte[] generateTone()
                           throws java.io.IOException
This method creates a Generate Tone message

Returns:
The encoded request
Throws:
java.io.IOException - on error

horizontalTab

public static byte[] horizontalTab()
                            throws java.io.IOException
This method creates a Horizontal Tab message

Returns:
The encoded request
Throws:
java.io.IOException - on error

initializePrinter

public static byte[] initializePrinter()
                                throws java.io.IOException
This method creates a Initialize Printer message

Returns:
The encoded request
Throws:
java.io.IOException - on error

lineFeed

public static byte[] lineFeed()
                       throws java.io.IOException
This method creates a Line Feed message

Returns:
The encoded request
Throws:
java.io.IOException - on error

openFormSlipStation

public static byte[] openFormSlipStation()
                                  throws java.io.IOException
This method creates a Open Form Slip Station message

Returns:
The encoded request
Throws:
java.io.IOException - on error

partialKnifeCut

public static byte[] partialKnifeCut()
                              throws java.io.IOException
This method creates a Partial knife cut message

Returns:
The encoded request
Throws:
java.io.IOException - on error

print

public static byte[] print()
                    throws java.io.IOException
This method creates a Print message

Returns:
The encoded request
Throws:
java.io.IOException - on error

printEjectSlip

public static byte[] printEjectSlip()
                             throws java.io.IOException
This method creates a Print Eject slip message

Returns:
The encoded request
Throws:
java.io.IOException - on error

printFeedNMinimumUnits

public static byte[] printFeedNMinimumUnits(int units)
                                     throws java.io.IOException
This method creates a Print Feed N Minimum units message

Parameters:
units - The number of units
Returns:
The encoded request
Throws:
java.io.IOException - on error

returnHomeSlipStation

public static byte[] returnHomeSlipStation()
                                    throws java.io.IOException
This method creates a Return Home slip station message

Returns:
The encoded request
Throws:
java.io.IOException - on error

setAbsoluteStartingPosition

public static byte[] setAbsoluteStartingPosition(int n1,
                                                 int n2)
                                          throws java.io.IOException
This method creates a Set absolute Starting position message

Parameters:
n1 - Starting position 1
n2 - Starting position 2
Returns:
The encoded request
Throws:
java.io.IOException - on error

setColumn

public static byte[] setColumn(int column)
                        throws java.io.IOException
This method creates a Set column message

Parameters:
column - The column
Returns:
The encoded request
Throws:
java.io.IOException - on error

setHorizontalTabPositions

public static byte[] setHorizontalTabPositions(int[] tabs)
                                        throws java.io.IOException
This method creates a Set horizontal Tab Positions message

Parameters:
tabs - The tab positions
Returns:
The encoded request
Throws:
java.io.IOException - on error

setLineSpacingToNUnits

public static byte[] setLineSpacingToNUnits(int units)
                                     throws java.io.IOException
This method creates a Set line spacing To N Units message

Parameters:
units - The units
Returns:
The encoded request
Throws:
java.io.IOException - on error

setLineSpacingToOneSixteenth

public static byte[] setLineSpacingToOneSixteenth()
                                           throws java.io.IOException
This method creates a Set line spacing to one sixteenth message

Returns:
The encoded request
Throws:
java.io.IOException - on error

setmodeSlip

public static byte[] setmodeSlip()
                          throws java.io.IOException
This method creates a Set mode slip message

Returns:
The encoded request
Throws:
java.io.IOException - on error

setmodeSlipeject

public static byte[] setmodeSlipeject()
                               throws java.io.IOException
This method creates a Setmode Slip eject message

Returns:
The encoded request
Throws:
java.io.IOException - on error

setmodeTimeout

public static byte[] setmodeTimeout()
                             throws java.io.IOException
This method creates a Set mode timeout message

Returns:
The encoded request
Throws:
java.io.IOException - on error

setSlipEjectLength

public static byte[] setSlipEjectLength(int len)
                                 throws java.io.IOException
This method creates a Set slip eject length message

Parameters:
len - The length
Returns:
The encoded request
Throws:
java.io.IOException - on error

print

public static byte[] print(java.lang.String theText)
                    throws java.io.IOException
This method prints string message

Parameters:
theText - The text to print
Returns:
The encoded request
Throws:
java.io.IOException - on error


Copyright © 2005, 2007, Oracle. All rights reserved.