com.bankframe.services.devices
Class MCADeviceProtocol

java.lang.Object
  extended byjava.io.OutputStream
      extended byjava.io.FilterOutputStream
          extended byjava.io.DataOutputStream
              extended bycom.bankframe.services.devices.MCADeviceProtocol
All Implemented Interfaces:
java.io.DataOutput, java.io.Serializable
Direct Known Subclasses:
MagTekIntelliPINDeviceProtocol, MagTekMiniMicrDeviceProtocol, SlipPrinterProtocol

public class MCADeviceProtocol
extends java.io.DataOutputStream
implements java.io.Serializable

This class wraps the message protocol creation for a BankFrame MCA device. All subclassed device objects should subclass com.bankframe.services.devices.MCADeviceProtocol for generation of device-specific protocol messages.

Messages or commands which are transmitted to the physical device are created in the subclassed MCADeviceProtocol class.

This MCADeviceProtocol class will contain a byte stream which can be passed to the peripheral.

See Also:
Serialized Form

Constructor Summary
MCADeviceProtocol(java.io.ByteArrayOutputStream buffer)
          The MCADeviceProtocol object constructor.
 
Method Summary
static java.lang.String dataToHexData(java.lang.String theRawData)
          Converts the String of raw binary data into a String of Hex numbers.
static java.lang.String getHexString(byte messageByte)
          Converts the byte into a hex string.
 byte[] internalbuffer()
          Returns the internal buffer's contents as a newly created array of bytes.
 
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

MCADeviceProtocol

public MCADeviceProtocol(java.io.ByteArrayOutputStream buffer)
The MCADeviceProtocol object constructor.

Method Detail

dataToHexData

public static java.lang.String dataToHexData(java.lang.String theRawData)
Converts the String of raw binary data into a String of Hex numbers.

Returns:
String The ASCII message.

getHexString

public static java.lang.String getHexString(byte messageByte)
Converts the byte into a hex string.

Returns:
Hex value String in syntax "0xF3"

internalbuffer

public byte[] internalbuffer()
Returns the internal buffer's contents as a newly created array of bytes.

Returns:
byte[] Internal buffer.


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