test_class.file: library/src/test/java/com/github/devnied/emvnfccard/utils/CommandApduTest.java
test_class.identifier: CommandApduTest
test_case.body: @Test
  	public void testToByte() {
  		Assertions.assertThat(BytesUtils.bytesToString(new CommandApdu(CommandEnum.GPO, 0x01, 0x02, 0x01).toBytes())).isEqualTo(
  				"80 A8 01 02 01");
  		Assertions.assertThat(BytesUtils.bytesToString(new CommandApdu(CommandEnum.GPO, new byte[] {}, 0x01).toBytes()))
  				.isEqualTo("80 A8 00 00 01");
  		Assertions.assertThat(BytesUtils.bytesToString(new CommandApdu(CommandEnum.GPO, null, 0x01).toBytes())).isEqualTo(
  				"80 A8 00 00 01");
  		Assertions.assertThat(BytesUtils.bytesToString(new CommandApdu(CommandEnum.GPO, 0x01, 0x02).toBytes())).isEqualTo(
  				"80 A8 01 02");
  	}
test_case.class_method_signature: CommandApduTest.testToByte()
test_case.full_signature: @Test public void testToByte()
test_case.identifier: testToByte
test_case.invocations: isEqualTo assertThat bytesToString toBytes isEqualTo assertThat bytesToString toBytes isEqualTo assertThat bytesToString toBytes isEqualTo assertThat bytesToString toBytes
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testToByte()
focal_class.declarator: mCla = 0x00
focal_class.modifier: protected
focal_class.original_string: protected int mCla = 0x00;
focal_class.type: int
focal_class.var_name: mCla
focal_class.declarator: mIns = 0x00
focal_class.modifier: protected
focal_class.original_string: protected int mIns = 0x00;
focal_class.type: int
focal_class.var_name: mIns
focal_class.declarator: mP1 = 0x00
focal_class.modifier: protected
focal_class.original_string: protected int mP1 = 0x00;
focal_class.type: int
focal_class.var_name: mP1
focal_class.declarator: mP2 = 0x00
focal_class.modifier: protected
focal_class.original_string: protected int mP2 = 0x00;
focal_class.type: int
focal_class.var_name: mP2
focal_class.declarator: mLc = 0x00
focal_class.modifier: protected
focal_class.original_string: protected int mLc = 0x00;
focal_class.type: int
focal_class.var_name: mLc
focal_class.declarator: mData = new byte[0]
focal_class.modifier: protected
focal_class.original_string: protected byte[] mData = new byte[0];
focal_class.type: byte[]
focal_class.var_name: mData
focal_class.declarator: mLe = 0x00
focal_class.modifier: protected
focal_class.original_string: protected int mLe = 0x00;
focal_class.type: int
focal_class.var_name: mLe
focal_class.declarator: mLeUsed = false
focal_class.modifier: protected
focal_class.original_string: protected boolean mLeUsed = false;
focal_class.type: boolean
focal_class.var_name: mLeUsed
focal_class.file: library/src/main/java/com/github/devnied/emvnfccard/utils/CommandApdu.java
focal_class.identifier: CommandApdu
focal_class.class_method_signature: CommandApdu.CommandApdu(final CommandEnum pEnum, final byte[] data, final int le)
focal_class.full_signature: public  CommandApdu(final CommandEnum pEnum, final byte[] data, final int le)
focal_class.identifier: CommandApdu
focal_class.modifiers: public
focal_class.parameters: (final CommandEnum pEnum, final byte[] data, final int le)
focal_class.signature:  CommandApdu(final CommandEnum pEnum, final byte[] data, final int le)
focal_class.class_method_signature: CommandApdu.CommandApdu(final CommandEnum pEnum, final int p1, final int p2, final int le)
focal_class.full_signature: public  CommandApdu(final CommandEnum pEnum, final int p1, final int p2, final int le)
focal_class.identifier: CommandApdu
focal_class.modifiers: public
focal_class.parameters: (final CommandEnum pEnum, final int p1, final int p2, final int le)
focal_class.signature:  CommandApdu(final CommandEnum pEnum, final int p1, final int p2, final int le)
focal_class.class_method_signature: CommandApdu.CommandApdu(final CommandEnum pEnum, final int p1, final int p2)
focal_class.full_signature: public  CommandApdu(final CommandEnum pEnum, final int p1, final int p2)
focal_class.identifier: CommandApdu
focal_class.modifiers: public
focal_class.parameters: (final CommandEnum pEnum, final int p1, final int p2)
focal_class.signature:  CommandApdu(final CommandEnum pEnum, final int p1, final int p2)
focal_class.class_method_signature: CommandApdu.CommandApdu(final CommandEnum pEnum, final int p1, final int p2, final byte[] data, final int le)
focal_class.full_signature: public  CommandApdu(final CommandEnum pEnum, final int p1, final int p2, final byte[] data, final int le)
focal_class.identifier: CommandApdu
focal_class.modifiers: public
focal_class.parameters: (final CommandEnum pEnum, final int p1, final int p2, final byte[] data, final int le)
focal_class.signature:  CommandApdu(final CommandEnum pEnum, final int p1, final int p2, final byte[] data, final int le)
focal_class.class_method_signature: CommandApdu.toBytes()
focal_class.full_signature: public byte[] toBytes()
focal_class.identifier: toBytes
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: byte[]
focal_class.signature: byte[] toBytes()
focal_method.body: public byte[] toBytes() {
  		int length = 4; // CLA, INS, P1, P2
  		if (mData != null && mData.length != 0) {
  			length += 1; // LC
  			length += mData.length; // DATA
  		}
  		if (mLeUsed) {
  			length += 1; // LE
  		}
  
  		byte[] apdu = new byte[length];
  
  		int index = 0;
  		apdu[index] = (byte) mCla;
  		index++;
  		apdu[index] = (byte) mIns;
  		index++;
  		apdu[index] = (byte) mP1;
  		index++;
  		apdu[index] = (byte) mP2;
  		index++;
  		if (mData != null && mData.length != 0) {
  			apdu[index] = (byte) mLc;
  			index++;
  			System.arraycopy(mData, 0, apdu, index, mData.length);
  			index += mData.length;
  		}
  		if (mLeUsed) {
  			apdu[index] += (byte) mLe; // LE
  		}
  
  		return apdu;
  	}
focal_method.class_method_signature: CommandApdu.toBytes()
focal_method.full_signature: public byte[] toBytes()
focal_method.identifier: toBytes
focal_method.invocations: arraycopy
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: byte[]
focal_method.signature: byte[] toBytes()