66
67 /**
68 * Establishes a connection to the card.
69 * If a connection has previously established using
70 * the specified protocol, this method returns the same Card object as
71 * the previous call.
72 *
73 * @param protocol the protocol to use ("T=0", "T=1", or "T=CL"), or "*" to
74 * connect using any available protocol.
75 *
76 * @throws NullPointerException if protocol is null
77 * @throws IllegalArgumentException if protocol is an invalid protocol
78 * specification
79 * @throws CardNotPresentException if no card is present in this terminal
80 * @throws CardException if a connection could not be established
81 * using the specified protocol or if a connection has previously been
82 * established using a different protocol
83 * @throws SecurityException if a SecurityManager exists and the
84 * caller does not have the required
85 * {@linkplain CardPermission permission}
86 */
87 public abstract Card connect(String protocol) throws CardException;
88
89 /**
90 * Returns whether a card is present in this terminal.
91 *
92 * @return whether a card is present in this terminal.
93 *
94 * @throws CardException if the status could not be determined
95 */
96 public abstract boolean isCardPresent() throws CardException;
97
98 /**
99 * Waits until a card is present in this terminal or the timeout
100 * expires. If the method returns due to an expired timeout, it returns
101 * false. Otherwise it return true.
102 *
103 * <P>If a card is present in this terminal when this
104 * method is called, it returns immediately.
105 *
|
66
67 /**
68 * Establishes a connection to the card.
69 * If a connection has previously established using
70 * the specified protocol, this method returns the same Card object as
71 * the previous call.
72 *
73 * @param protocol the protocol to use ("T=0", "T=1", or "T=CL"), or "*" to
74 * connect using any available protocol.
75 *
76 * @throws NullPointerException if protocol is null
77 * @throws IllegalArgumentException if protocol is an invalid protocol
78 * specification
79 * @throws CardNotPresentException if no card is present in this terminal
80 * @throws CardException if a connection could not be established
81 * using the specified protocol or if a connection has previously been
82 * established using a different protocol
83 * @throws SecurityException if a SecurityManager exists and the
84 * caller does not have the required
85 * {@linkplain CardPermission permission}
86 * @return the card the connection has been established with
87 */
88 public abstract Card connect(String protocol) throws CardException;
89
90 /**
91 * Returns whether a card is present in this terminal.
92 *
93 * @return whether a card is present in this terminal.
94 *
95 * @throws CardException if the status could not be determined
96 */
97 public abstract boolean isCardPresent() throws CardException;
98
99 /**
100 * Waits until a card is present in this terminal or the timeout
101 * expires. If the method returns due to an expired timeout, it returns
102 * false. Otherwise it return true.
103 *
104 * <P>If a card is present in this terminal when this
105 * method is called, it returns immediately.
106 *
|