1 /*
   2  *  Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
   3  *  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  *  This code is free software; you can redistribute it and/or modify it
   6  *  under the terms of the GNU General Public License version 2 only, as
   7  *  published by the Free Software Foundation.  Oracle designates this
   8  *  particular file as subject to the "Classpath" exception as provided
   9  *  by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  *  This code is distributed in the hope that it will be useful, but WITHOUT
  12  *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  *  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  *  version 2 for more details (a copy is included in the LICENSE file that
  15  *  accompanied this code).
  16  *
  17  *  You should have received a copy of the GNU General Public License version
  18  *  2 along with this work; if not, write to the Free Software Foundation,
  19  *  Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  *  Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  *  or visit www.oracle.com if you need additional information or have any
  23  *  questions.
  24  */
  25 
  26 /**
  27  * Java™ Smart Card I/O API.
  28  *
  29  * This specification describes the Java Smart Card I/O API defined by
  30  * <a href="http://jcp.org/en/jsr/detail?id=268">JSR 268</a>.
  31  *
  32  * It defines a Java API for communication with Smart Cards
  33  * using ISO/IEC 7816-4 APDUs. It thereby allows Java applications to interact with
  34  * applications running on the Smart Card, to store and retrieve data
  35  * on the card, etc.
  36  *
  37  * <p>
  38  * The API is defined by classes in the package
  39  * <code>javax.smartcardio</code>. They can be classified as follows:
  40  *
  41  * <dl>
  42  * <dt>Classes describing the corresponding Smart Card structures
  43  * <dd>
  44  * <a href="ATR.html">ATR</a>,
  45  * <a href="CommandAPDU.html">CommandAPDU</a>,
  46  * <a href="ResponseAPDU.html">ResponseAPDU</a>
  47  *
  48  * <dt>Factory to obtain implementations
  49  * <dd>
  50  * <a href="TerminalFactory.html">TerminalFactory</a>
  51  *
  52  * <dt>Main classes for card and terminal functions
  53  * <dd>
  54  * <a href="CardTerminals.html">CardTerminals</a>,
  55  * <a href="CardTerminal.html">CardTerminal</a>,
  56  * <a href="Card.html">Card</a>,
  57  * <a href="CardChannel.html">CardChannel</a>
  58  *
  59  * <dt>Supporting permission and exception classes
  60  * <dd>
  61  * <a href="CardPermission.html">CardPermission</a>,
  62  * <a href="CardException.html">CardException</a>,
  63  * <a href="CardNotPresentException.html">CardNotPresentException</a>
  64  *
  65  * <dt>Service provider interface, not accessed directly by applications
  66  * <dd>
  67  * <a href="TerminalFactorySpi.html">TerminalFactorySpi</a>
  68  *
  69  * </dl>
  70  *
  71  *
  72  * <h3>API Example</h3>
  73  *
  74  * A simple example of using the API is:
  75  * <pre>
  76  *      // show the list of available terminals
  77  *      TerminalFactory factory = TerminalFactory.getDefault();
  78  *      List&lt;CardTerminal&gt; terminals = factory.terminals().list();
  79  *      System.out.println("Terminals: " + terminals);
  80  *      // get the first terminal
  81  *      CardTerminal terminal = terminals.get(0);
  82  *      // establish a connection with the card
  83  *      Card card = terminal.connect("T=0");
  84  *      System.out.println("card: " + card);
  85  *      CardChannel channel = card.getBasicChannel();
  86  *      ResponseAPDU r = channel.transmit(new CommandAPDU(c1));
  87  *      System.out.println("response: " + toString(r.getBytes()));
  88  *      // disconnect
  89  *      card.disconnect(false);
  90  * </pre>
  91  *
  92  * @since   1.6
  93  * @author  Andreas Sterbenz
  94  * @author  JSR 268 Expert Group
  95  */
  96 package javax.smartcardio;