Card

Card (스마트카드)

연결이 수립된 스마트카드를 나타내는 클래스입니다.

출처: Java API Reference

본문

Card 객체는 CardTerminal.connect()를 호출해 얻습니다. 이 객체를 통해 카드와 APDU를 주고받을 수 있습니다.

protected Card()
public abstract ATR getATR()
public abstract String getProtocol()
public abstract CardChannel getBasicChannel()
public abstract CardChannel openLogicalChannel() throws CardException
public abstract void beginExclusive() throws CardException
public abstract void endExclusive() throws CardException
public abstract byte[] transmitControlCommand(int controlCode, byte[] command) throws CardException
public abstract void disconnect(boolean reset) throws CardException

getATR()는 카드의 ATR을 반환하고, getBasicChannel()은 기본 논리 채널을, openLogicalChannel()은 새 논리 채널을 엽니다. beginExclusive()endExclusive()로 다른 애플리케이션의 접근을 배제하는 독점 접근을 수행할 수 있고, disconnect(boolean reset)resettrue면 카드를 재설정한 뒤 연결을 끊습니다.

더 알아보기 (Learn more)

Java 공식 API