Class IdentificationCardTrackTwo


  • public class IdentificationCardTrackTwo
    extends java.lang.Object
    This class represents track two of a magnetic strip identification card such as a United States driver's license.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Date getBirthDate()
      Gets the birth date of the card-holder.
      java.util.Date getExpiration()
      Gets the expiration date of the document.
      java.lang.String getIdNumber()
      Gets the identification number of the document.
      java.lang.String getIssuerNumber()
      Gets the issuer identification number.
      static IdentificationCardTrackTwo parse​(java.lang.String trackData)
      This method attempts to parse track two data from a raw magnetic strip string.
      java.lang.String toString()
      Returns this object as a human readable string.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • IdentificationCardTrackTwo

        public IdentificationCardTrackTwo()
    • Method Detail

      • parse

        public static IdentificationCardTrackTwo parse​(java.lang.String trackData)
        This method attempts to parse track two data from a raw magnetic strip string.
        Parameters:
        trackData - Track data to parse.
        Returns:
        IdentificationCardTrackTwo data if possible, null otherwise.
      • toString

        public java.lang.String toString()
        Returns this object as a human readable string.
        Overrides:
        toString in class java.lang.Object
        Returns:
        String containing human readable string.
      • getIssuerNumber

        public java.lang.String getIssuerNumber()
        Gets the issuer identification number. This can be used to determine which state issued the document.
        Returns:
        the issuerNumber
      • getIdNumber

        public java.lang.String getIdNumber()
        Gets the identification number of the document.
        Returns:
        the idNumber
      • getExpiration

        public java.util.Date getExpiration()
        Gets the expiration date of the document.
        Returns:
        the expiration
      • getBirthDate

        public java.util.Date getBirthDate()
        Gets the birth date of the card-holder.
        Returns:
        the birthDate