com.jaccal.command
Class Command

java.lang.Object
  extended bycom.jaccal.command.Command
Direct Known Subclasses:
ApduCmd, ISOCommand

public abstract class Command
extends Object

Author:
Thomas Tarpin-Lyonnet, Chang Sau Sheong Encapsulates an ISO 7816 command that is sent to the card.

Field Summary
protected  byte cla
           
protected  byte[] data
           
protected  byte ins
           
protected  byte lc
           
protected  byte le
           
protected  byte p1
           
protected  byte p2
           
 
Constructor Summary
Command()
           
Command(byte cla, byte ins)
           
Command(byte cla, byte ins, byte p1, byte p2, byte lc, byte[] data, byte le)
           
Command(String cmdStr)
           
Command(String cmdHeader, String cmdDataField)
           
 
Method Summary
 byte[] getBytes()
           
 byte getCla()
           
 byte[] getData()
           
 byte getIns()
           
 byte getLc()
           
 byte getLe()
           
 byte getP1()
           
 byte getP2()
           
 void setCla(byte cla)
           
 void setData(byte[] data)
           
 void setLc(byte lc)
           
 void setLe(byte le)
           
 void setP1(byte p1)
           
 void setP2(byte p2)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

cla

protected byte cla

ins

protected byte ins

p1

protected byte p1

p2

protected byte p2

lc

protected byte lc

le

protected byte le

data

protected byte[] data
Constructor Detail

Command

public Command()

Command

public Command(byte cla,
               byte ins)

Command

public Command(byte cla,
               byte ins,
               byte p1,
               byte p2,
               byte lc,
               byte[] data,
               byte le)

Command

public Command(String cmdStr)
        throws CardException

Command

public Command(String cmdHeader,
               String cmdDataField)
        throws CardException
Method Detail

getBytes

public final byte[] getBytes()
                      throws IOException
Throws:
IOException

getCla

public byte getCla()

getIns

public byte getIns()

getP1

public byte getP1()

getP2

public byte getP2()

getLc

public byte getLc()

getLe

public byte getLe()

setP1

public void setP1(byte p1)

setP2

public void setP2(byte p2)

setLc

public void setLc(byte lc)

setLe

public void setLe(byte le)

getData

public byte[] getData()

setData

public void setData(byte[] data)
Parameters:
data - The data to set

setCla

public void setCla(byte cla)
            throws CardException
Parameters:
cla - The cla to set.
Throws:
CardException

toString

public String toString()


Copyright © 2005 Chang Sau Sheong, Thomas Tarpin-Lyonnet. All Rights Reserved.