/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* the platform specific superclass.
*
* @since 1.6
* @author Andreas Sterbenz
*/
private PCSC() {
// no instantiation
}
if (initException != null) {
throw new UnsupportedOperationException
("PC/SC not available on this platform", initException);
}
}
// returns SCARDCONTEXT (contextId)
static native long SCardEstablishContext
(int scope)
throws PCSCException;
(long contextId)
throws PCSCException;
// returns SCARDHANDLE (cardId)
static native long SCardConnect
throws PCSCException;
static native byte[] SCardTransmit
throws PCSCException;
// returns the ATR of the card, updates status[] with reader state and protocol
static native byte[] SCardStatus
throws PCSCException;
static native void SCardDisconnect
(long cardId, int disposition)
throws PCSCException;
// returns dwEventState[] of the same size and order as readerNames[]
static native int[] SCardGetStatusChange
throws PCSCException;
static native void SCardBeginTransaction
(long cardId)
throws PCSCException;
static native void SCardEndTransaction
(long cardId, int disposition)
throws PCSCException;
static native byte[] SCardControl
throws PCSCException;
// MS undocumented
// std. Windows invalid handle return code, used instead of SCARD code
//
for (int i = 0; i < b.length; i++) {
int k = b[i] & 0xff;
if (i != 0) {
}
}
}
}