Class CardReaderAPDUResponse


  • public class CardReaderAPDUResponse
    extends Object
    Content of the Card Reader APDU Response message. It contains the result of the requested service, APDU response sent by the chip of the card in response to the APDU request.
    • Constructor Detail

      • CardReaderAPDUResponse

        public CardReaderAPDUResponse()
    • Method Detail

      • response

        public CardReaderAPDUResponse response​(Response response)
        response
        Parameters:
        response -
        Returns:
        the current CardReaderAPDUResponse instance, allowing for method chaining
      • getResponse

        public Response getResponse()
        Get response
        Returns:
        response
      • setResponse

        public void setResponse​(Response response)
        response
        Parameters:
        response -
      • apDUData

        public CardReaderAPDUResponse apDUData​(byte[] apDUData)
        Data field of the APDU command (Lc + Data).
        Parameters:
        apDUData - Data field of the APDU command (Lc + Data).
        Returns:
        the current CardReaderAPDUResponse instance, allowing for method chaining
      • getApDUData

        public byte[] getApDUData()
        Data field of the APDU command (Lc + Data).
        Returns:
        apDUData Data field of the APDU command (Lc + Data).
      • setApDUData

        public void setApDUData​(byte[] apDUData)
        Data field of the APDU command (Lc + Data).
        Parameters:
        apDUData - Data field of the APDU command (Lc + Data).
      • cardStatusWords

        public CardReaderAPDUResponse cardStatusWords​(byte[] cardStatusWords)
        Status of a smartcard response to a command (SW1-SW2).
        Parameters:
        cardStatusWords - Status of a smartcard response to a command (SW1-SW2).
        Returns:
        the current CardReaderAPDUResponse instance, allowing for method chaining
      • getCardStatusWords

        public byte[] getCardStatusWords()
        Status of a smartcard response to a command (SW1-SW2).
        Returns:
        cardStatusWords Status of a smartcard response to a command (SW1-SW2).
      • setCardStatusWords

        public void setCardStatusWords​(byte[] cardStatusWords)
        Status of a smartcard response to a command (SW1-SW2).
        Parameters:
        cardStatusWords - Status of a smartcard response to a command (SW1-SW2).
      • includeNullValues

        public CardReaderAPDUResponse includeNullValues​(boolean includeNullValues)
        Configures whether null values are explicitly serialized in the JSON payload. Default is false.
      • isIncludeNullValues

        public boolean isIncludeNullValues()
        Returns whether null values are explicitly serialized in the JSON payload.
      • setIncludeNullValues

        public void setIncludeNullValues​(boolean includeNullValues)
        Sets whether null values should be explicitly serialized in the JSON payload. Default is false.
      • equals

        public boolean equals​(Object o)
        Return true if this CardReaderAPDUResponse object is equal to o.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getExplicitNulls

        public Map<String,​Object> getExplicitNulls()
        Returns a map of properties to be merged into the JSON payload as explicit null values.
      • fromJson

        public static CardReaderAPDUResponse fromJson​(String jsonString)
                                               throws com.fasterxml.jackson.core.JsonProcessingException
        Create an instance of CardReaderAPDUResponse given an JSON string
        Parameters:
        jsonString - JSON string
        Returns:
        An instance of CardReaderAPDUResponse
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException - if the JSON string is invalid with respect to CardReaderAPDUResponse
      • toJson

        public String toJson()
                      throws com.fasterxml.jackson.core.JsonProcessingException
        Convert an instance of CardReaderAPDUResponse to an JSON string
        Returns:
        JSON string
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException