com.bankframe.services.devices
Class MCADeviceProtocol

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

public class MCADeviceProtocol
extends DataOutputStream
implements 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(ByteArrayOutputStream buffer)
          The MCADeviceProtocol object constructor.
 
Method Summary
static String dataToHexData(String theRawData)
          Converts the String of raw binary data into a String of Hex numbers.
static 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(ByteArrayOutputStream buffer)
The MCADeviceProtocol object constructor.

Parameters:
buffer - ByteArrayOutputStream
Method Detail

dataToHexData

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

Parameters:
theRawData - String The raw message.
Returns:
String The ASCII message.

getHexString

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

Parameters:
messageByte - The message byte.
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.