|
13 | 13 |
|
14 | 14 | import java.util.Arrays; |
15 | 15 | import java.util.List; |
16 | | -import org.eclipse.keyple.core.util.json.JsonUtil; |
| 16 | +import org.eclipse.keyple.core.util.HexUtil; |
17 | 17 | import org.eclipse.keypop.card.ApduResponseApi; |
18 | 18 | import org.eclipse.keypop.card.CardResponseApi; |
19 | 19 | import org.eclipse.keypop.card.CardSelectionResponseApi; |
@@ -57,15 +57,16 @@ public int getStatusWord() { |
57 | 57 | return statusWord; |
58 | 58 | } |
59 | 59 |
|
60 | | - /** |
61 | | - * Converts the APDU response into a string where the data is encoded in a json format. |
62 | | - * |
63 | | - * @return A not empty String |
64 | | - * @since 2.0.0 |
65 | | - */ |
66 | 60 | @Override |
67 | 61 | public String toString() { |
68 | | - return "APDU_RESPONSE = " + JsonUtil.toJson(this); |
| 62 | + return "ApduResponseAdapter{" |
| 63 | + + "apdu='" |
| 64 | + + HexUtil.toHex(apdu) |
| 65 | + + '\'' |
| 66 | + + ", statusWord='" |
| 67 | + + HexUtil.toHex(statusWord) |
| 68 | + + '\'' |
| 69 | + + '}'; |
69 | 70 | } |
70 | 71 |
|
71 | 72 | @Override |
@@ -132,6 +133,16 @@ public boolean isLogicalChannelOpen() { |
132 | 133 | return isLogicalChannelOpen; |
133 | 134 | } |
134 | 135 |
|
| 136 | + @Override |
| 137 | + public String toString() { |
| 138 | + return "CardResponseAdapter{" |
| 139 | + + "apduResponses=" |
| 140 | + + apduResponses |
| 141 | + + ", isLogicalChannelOpen=" |
| 142 | + + isLogicalChannelOpen |
| 143 | + + '}'; |
| 144 | + } |
| 145 | + |
135 | 146 | @Override |
136 | 147 | public boolean equals(Object o) { |
137 | 148 | if (this == o) return true; |
@@ -183,5 +194,16 @@ public boolean hasMatched() { |
183 | 194 | public CardResponseApi getCardResponse() { |
184 | 195 | throw new UnsupportedOperationException("hasMatched"); |
185 | 196 | } |
| 197 | + |
| 198 | + @Override |
| 199 | + public String toString() { |
| 200 | + return "CardSelectionResponseAdapter{" |
| 201 | + + "powerOnData='" |
| 202 | + + powerOnData |
| 203 | + + '\'' |
| 204 | + + ", selectApplicationResponse=" |
| 205 | + + selectApplicationResponse |
| 206 | + + '}'; |
| 207 | + } |
186 | 208 | } |
187 | 209 | } |
0 commit comments