Lines Matching defs:data

42  * value Ne. In other words, a value of 0 means "no data in the response APDU"
55 * <p>Instances of this class are immutable. Where data is passed in or out
80 // index of start of data within the apdu array
112 * data begins
152 * <p>Note that the data in the ByteBuffer is copied to protect against
182 * response data length. This is case 2 in ISO 7816, empty command data
190 * @param ne the maximum number of expected data bytes in a response APDU
200 * Constructs a CommandAPDU from the four header bytes and command data.
201 * This is case 3 in ISO 7816, command data present and Ne absent. The
202 * value Nc is taken as data.length. If <code>data</code> is null or
205 * <p>Note that the data bytes are copied to protect against
212 * @param data the byte array containing the data bytes of the command body
214 * @throws IllegalArgumentException if data.length is greater than 65535
216 public CommandAPDU(int cla, int ins, int p1, int p2, byte[] data) {
217 this(cla, ins, p1, p2, data, 0, arrayLength(data), 0);
221 * Constructs a CommandAPDU from the four header bytes and command data.
222 * This is case 3 in ISO 7816, command data present and Ne absent. The
226 * <p>Note that the data bytes are copied to protect against
233 * @param data the byte array containing the data bytes of the command body
234 * @param dataOffset the offset in the byte array at which the data
236 * @param dataLength the number of the data bytes in the command body
238 * @throws NullPointerException if data is null and dataLength is not 0
240 * negative or if dataOffset + dataLength are greater than data.length
243 public CommandAPDU(int cla, int ins, int p1, int p2, byte[] data,
245 this(cla, ins, p1, p2, data, dataOffset, dataLength, 0);
249 * Constructs a CommandAPDU from the four header bytes, command data,
250 * and expected response data length. This is case 4 in ISO 7816,
251 * command data and Ne present. The value Nc is taken as data.length
252 * if <code>data</code> is non-null and as 0 otherwise. If Ne or Nc
255 * <p>Note that the data bytes are copied to protect against
262 * @param data the byte array containing the data bytes of the command body
263 * @param ne the maximum number of expected data bytes in a response APDU
265 * @throws IllegalArgumentException if data.length is greater than 65535
268 public CommandAPDU(int cla, int ins, int p1, int p2, byte[] data, int ne) {
269 this(cla, ins, p1, p2, data, 0, arrayLength(data), ne);
355 * Constructs a CommandAPDU from the four header bytes, command data,
356 * and expected response data length. This is case 4 in ISO 7816,
357 * command data and Le present. The value Nc is taken as
362 * <p>Note that the data bytes are copied to protect against
369 * @param data the byte array containing the data bytes of the command body
370 * @param dataOffset the offset in the byte array at which the data
372 * @param dataLength the number of the data bytes in the command body
373 * @param ne the maximum number of expected data bytes in a response APDU
375 * @throws NullPointerException if data is null and dataLength is not 0
377 * negative or if dataOffset + dataLength are greater than data.length,
381 public CommandAPDU(int cla, int ins, int p1, int p2, byte[] data,
383 checkArrayBounds(data, dataOffset, dataLength);
435 System.arraycopy(data, dataOffset, apdu, 5, dataLength);
444 System.arraycopy(data, dataOffset, apdu, 7, dataLength);
454 System.arraycopy(data, dataOffset, apdu, 5, dataLength);
464 System.arraycopy(data, dataOffset, apdu, 7, dataLength);
519 * Returns the number of data bytes in the command body (Nc) or 0 if this
523 * @return the number of data bytes in the command body or 0 if this APDU
531 * Returns a copy of the data bytes in the command body. If this APDU as
534 * @return a copy of the data bytes in the command body or the empty
538 byte[] data = new byte[nc];
539 System.arraycopy(apdu, dataOffset, data, 0, nc);
540 return data;
544 * Returns the maximum number of expected data bytes in a response
547 * @return the maximum number of expected data bytes in a response APDU.