|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.ibutton.iButton
|
+--com.ibutton.jib.JibButton
Class to provide access to all iButton with Java API commands.
| Field Summary | |
static int |
SEND_APDU
|
| Constructor Summary | |
JibButton(Access access,
int[] romID)
Constructor for the JibButton object. |
|
| Method Summary | |
void |
appendData(byte[] newData)
Append a byte[] to the body of the command packet. |
void |
appendData(char[] newData)
Append a char[] to the body of the command packet. |
void |
appendData(int newData)
Append an integer to the body of the command packet. |
void |
appendData(int[] newData)
Append an int[] to the body of the command packet. |
ResponseAPDU |
getAIDbyNumber(int number)
Returns the AID of the applet with the given number. |
ResponseAPDU |
getAppletGCMode()
Reads the Applet Garbage Collection mode. |
byte[] |
getATR()
Reads the Answer to Reset from the iButton as defined in ISO7816-5 |
ResponseAPDU |
getCommandPINMode()
Returns the mode of the CommandPIN. |
ResponseAPDU |
getCommitBufferSize()
Gets the size of the iButton's Commit Buffer. |
ResponseAPDU |
getEphemeralGCMode()
Reads the Ephemeral Garbage Collection mode. |
ResponseAPDU |
getExceptionMode()
Gets the Exception mode. |
ResponseAPDU |
getLoadPINMode()
Returns the mode of the LoadPIN. |
protected ResponseAPDU |
getPORCount()
Gets the number of Power On Resets(PORs) the device has experienced since the last master erase. |
ResponseAPDU |
getRandomBytes(int numBytes)
Reads random bytes from the iButton. |
ResponseAPDU |
getRealTimeClock()
Reads the Real Time Clock of the iButton. |
ResponseAPDU |
getRestoreMode()
Get the Restore Mode from the iButton. |
ResponseAPDU |
masterErase()
Issues a master erase of the iButton |
ResponseAPDU |
readFirmwareVersionID()
returns a ResponseAPDU containing the Firmware Version ID. |
ResponseAPDU |
readFreeRAM()
returns a ResponseAPDU that contains the amount of free RAM, the data is returned in little endian format. |
byte[] |
sendAPDU(byte[] apdu,
int ms)
Sends an APDU to the iButton. |
ResponseAPDU |
sendAPDU(CommandAPDU apdu,
int ms)
Sends a CommandAPDU, as defined in ISO 7816, to an iButton. |
ResponseAPDU |
setAppletGCMode(int mode)
Sets the mode of the applet garbage collector. |
ResponseAPDU |
setCommandPINMode(int mode)
Sets the mode of the CommandPIN. |
ResponseAPDU |
setCommitBufferSize(short size)
Sets the iButtons CommitBufferSize. |
ResponseAPDU |
setEphemeralGCMode(int mode)
Sets the mode of the ephemeral garbage collector. |
ResponseAPDU |
setExceptionMode(int mode)
Sets the Exception mode of the iButton. |
ResponseAPDU |
setLoadPINMode(int mode)
Sets the mode of the LoadPIN. |
ResponseAPDU |
setMasterPIN(JibMasterPIN newPIN)
Sets the common pin of the iButton. |
void |
setPIN(JibMasterPIN pin)
This method sets the Common PIN in this class, not on the iButton. |
ResponseAPDU |
setRestoreMode(int mode)
Sets the Restore Mode value. |
| Methods inherited from class com.ibutton.iButton |
getAccess,
getFamilyCode,
getRomID,
isRomID,
select,
toString |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
public static final int SEND_APDU
| Constructor Detail |
public JibButton(Access access,
int[] romID)
access - object representing how this JibButton object will communicate with an iButton.romID - the romID of the iButton to communicate with.| Method Detail |
public void setPIN(JibMasterPIN pin)
pin - the PIN to store internal to this class as the identified Common PIN
setCommonPINpublic ResponseAPDU masterErase()
public ResponseAPDU readFreeRAM()
public ResponseAPDU readFirmwareVersionID()
public ResponseAPDU getEphemeralGCMode()
public ResponseAPDU setEphemeralGCMode(int mode)
mode - 1 - turn the collector on, 0 - turn the collector off.public ResponseAPDU getAppletGCMode()
public ResponseAPDU setAppletGCMode(int mode)
mode - 1 - turn the collector on, 0 - turn the collector off.public ResponseAPDU getCommandPINMode()
public ResponseAPDU setCommandPINMode(int mode)
mode - 1 - set the CommandPIN mode to require a PIN for all Administrative commands.
0 - set the CommandPIN mode to not require a PIN for all Administrative commands.public ResponseAPDU getLoadPINMode()
public ResponseAPDU setLoadPINMode(int mode)
mode - 1 - set the LoadPIN mode to require a PIN for applet load.
0 - set the CommandPIN mode to not require a PIN for applet load.public ResponseAPDU getRestoreMode()
public ResponseAPDU setRestoreMode(int mode)
public ResponseAPDU getExceptionMode()
public ResponseAPDU setExceptionMode(int mode)
mode - 1 - set the Exception mode to allow VM thrown exceptions.
0 - set the Exception mode to not allow the VM to throw exceptions.public ResponseAPDU getCommitBufferSize()
public ResponseAPDU setCommitBufferSize(short size)
size - the new size of the commit buffer.public byte[] getATR()
public ResponseAPDU getRealTimeClock()
public ResponseAPDU getRandomBytes(int numBytes)
numBytes - the number of random bytes to read from the iButton.public ResponseAPDU getAIDbyNumber(int number)
number - the number of the applet to retrieve the AID.protected ResponseAPDU getPORCount()
public ResponseAPDU setMasterPIN(JibMasterPIN newPIN)
newPIN - the new PIN for the iButton
public ResponseAPDU sendAPDU(CommandAPDU apdu,
int ms)
apdu - - the command apdu object to be sent to the iButton.ms - - the number of milliseconds to run the iButton.
public byte[] sendAPDU(byte[] apdu,
int ms)
apdu - the byte array (APDU) to be sent to the iButton.ms - the run time in milliseconds for the iButton.public void appendData(int[] newData)
newData - the array to be appended to the body of the command packet.public void appendData(char[] newData)
newData - the char[] to be appended to the body of the command packet.public void appendData(int newData)
newData - the integer to be appended.public void appendData(byte[] newData)
newData - the byte[] to be appended.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||