Represents a response Application Protocol Data Unit. ISO 7816-4 defines
the structure of the ResponseAPDU. The reponse contains two mandatory
bytes called status words, SW1, SW2, preceeded by some data.
+--------------------------------------+
| Data | SW1 | SW2 |
+--------------------------------------+
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
ResponseAPDU
public ResponseAPDU(byte[] data,
byte sw1,
byte sw2)
Constructs a ResponseAPDU object, with response data and
status words 1 and 2.
Parameters:
data - A byte array representing the response received. See ISO 7816-4 5.3.3.
sw1 - Status word one.
sw2 - Status word two.
Since:
JDE 4.1.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Method Detail
appendData
public void appendData(byte[] data,
byte sw1,
byte sw2)
Append the given data to the data portion of the response APDU
Parameters:
data -
Since:
JDE 4.1.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
checkStatusWords
public boolean checkStatusWords(byte sw1,
byte sw2)
Check to see if the passed in status words match the status words in the response.
Parameters:
sw1 - The first status word
sw2 - The second status word
Returns:
true if the passed in status words match the status words in the response.
Since:
JDE 4.1.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
getAPDU
public byte[] getAPDU()
Get the full Response APDU command, including the data, followed by the two status words.
Returns:
The full response APDU.
Since:
JDE 4.1.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
getData
public byte[] getData()
Returns a byte array representing the data component of the Response APDU.
Returns:
A byte array containing the data component of the Response APDU.
May return null, if the data has not been set.
Since:
JDE 4.1.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
getSW1
public byte getSW1()
Returns a byte representing the first status word as defined in ISO
7816-4 5.4.5.
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
getSW2
public byte getSW2()
Returns a byte representing the second status word as defined in ISO
7816-4 5.4.5.
Returns:
A byte representing status word two.
Since:
JDE 4.1.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
set
public void set(byte[] data,
byte sw1,
byte sw2)
Sets the byte array representation of the object.
Parameters:
data - A byte array representing the response received. See ISO 7816-4 5.3.3.
sw1 - Status word one.
sw2 - Status word two.
Since:
JDE 4.1.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Copyright 1999-2007 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved. Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. Copyright 2002-2003 Nokia Corporation All Rights Reserved. Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.