?? samplereaderio.java
字號:
* @throws IOException for any other error condition */ public Identifier writeIdentifier(Identifier id, Object param) throws IOException, TimeoutException, ConnectionResetException { throw new IOException("Not yet implemented"); } /** * Read the contents of the user data memory bank from the transponder identified. * The operation will return when all the data in the memory bank has been read or * the scanDuration timeout has been reached. * @param identifier is the Identifier from which to read information * @param scanLength the number of milliseconds the reader should wait for a reply * @return byte[] with the User Memory Bank contents * @throws TimeoutException if the reader did not reply within the timeout specified during the creation of the ReaderIO * @throws ConnectionResetException if the connection to the reader has been lost * @throws IOException for any other error condition * @throws NotSupportedException if the operation is not supported by the reader */ public byte[] readUserData(Identifier identifier, long scanLength) throws IOException, TimeoutException, ConnectionResetException, NotSupportedException { // TODO put your code here throw new NotSupportedException(); } /** * Writes the specified data into the User Data memory bank of the transponder identified * by identifier. * @param identifier is the Identifier for the transponder to which the data will be written * @param offset is the int specifying where to start writing the data within the User Data * memory bank. The starting offset is 0. data[0] is written at offset, data[1] is written * at offset+1, etc. * @param data is the byte[] containing the data to be written * @param password is the byte[] containing the write/access password needed to update the transponder * @param scanLength the number of milliseconds the reader should wait for a reply * @throws ConnectionResetException if the connection to the reader has been lost * @throws IOException for any other error condition * @throws NotSupportedException if the operation is not supported by the reader */ public void writeUserData(Identifier identifier, int offset, byte[] data, byte[] password, long scanLength) throws IOException, TimeoutException, ConnectionResetException, NotSupportedException { // TODO put your code here throw new NotSupportedException(); } /** * The Transponder's User Memory is divided in blocks, each block containing a number of bytes. This method returns the * total number of bytes in the User Memory Area, equivalent to blockCount * blockSize. * @return the number of bytes of User Memory in the transponder * @throws IdentifierException if the Identifer provided is not valid or is not in the RF field * @throws TimeoutException if the reader did not reply within the timeout specified during the creation of the ReaderIO * @throws ConnectionResetException if the connection to the reader has been lost * @throws IOException for any other error condition * */ public int getUserDataSize(Identifier identifier) throws IOException, TimeoutException, ConnectionResetException, NotSupportedException { // TODO put your code here throw new NotSupportedException(); } /** * Obtains the Protocol of the transponder identified by identifier. The protocol can be one of * the constants defined in com.sun.autoid.identity.RfidTag * @param identifier is the Identifier for the transponder * @return protocol the int corresponding to the mapping of protocols defined by RfidTag * @throws ConnectionResetException if the connection to the reader has been lost * @throws IOException for any other error condition * @throws NotSupportedException if the operation is not supported by the reader */ public int getTagProtocol(Identifier identifier) throws IOException, TimeoutException, ConnectionResetException, NotSupportedException { // TODO put your code here throw new NotSupportedException(); } /** * Obtains the type of transponder identified by identifier. The type can be one of * the constants defined in com.sun.autoid.identity.RfidTag * @param identifier is the Identifier for the transponder * @return tagType the int identifying the transponder type defined by RfidTag * @throws ConnectionResetException if the connection to the reader has been lost * @throws IOException for any other error condition * @throws NotSupportedException if the operation is not supported by the reader */ public int getTagType(Identifier identifier) throws IOException, TimeoutException, ConnectionResetException, NotSupportedException { // TODO put your code here throw new NotSupportedException(); } /** * Locks the EPC/ Identifier area of the transponder when this is read/write. * @param identifier is the Identifier for the transponder * @param password is the byte[] containing the lock code * @return true if the EPC was locked, false otherwise * @throws ConnectionResetException if the connection to the reader has been lost * @throws IOException for any other error condition * @throws NotSupportedException if the operation is not supported by the reader */ public boolean lockEpc(Identifier identifier, byte[] password) throws IOException, TimeoutException, ConnectionResetException, NotSupportedException { // TODO put your code here throw new NotSupportedException(); } /** * Locks the User Memory area of the transponder. * @param identifier is the Identifier for the transponder * @param password is the byte[] containing the lock code * @return true if the User Memory area was locked, false otherwise * @throws ConnectionResetException if the connection to the reader has been lost * @throws IOException for any other error condition * @throws NotSupportedException if the operation is not supported by the reader */ public boolean lockUserData(Identifier identifier, byte[] password) throws IOException, TimeoutException, ConnectionResetException, NotSupportedException { // TODO put your code here throw new NotSupportedException(); } /** * Permanently kills the transponder. * @param identifier is the Identifier for the transponder * @param password is the byte[] containing the kill code * @return truee if the transponder was killed, false otherwise * @throws ConnectionResetException if the connection to the reader has been lost * @throws IOException for any other error condition * @throws NotSupportedException if the operation is not supported by the reader */ public boolean killTag(Identifier identifier, byte[] password) throws IOException, TimeoutException, ConnectionResetException, NotSupportedException { // TODO put your code here throw new NotSupportedException(); } /** * Provides the version of the firmware running on the reader * @return a String identifying the firmware * @throws TimeoutException if the reader did not reply within the timeout specified during the creation of the ReaderIO * @throws ConnectionResetException if the connection to the reader has been lost * @throws IOException for any other error condition */ public String getFirmwareVersion() throws IOException, ConnectionResetException, TimeoutException { return "SampleReader - Version 1"; } /** * Provides the Protocols supported * @return a List of Strings, each element representing a supported protocol * @throws TimeoutException if the reader did not reply within the timeout specified during the creation of the ReaderIO * @throws ConnectionResetException if the connection to the reader has been lost * @throws IOException for any other error condition */ public List getSupportedProtocols() throws IOException, TimeoutException, ConnectionResetException { ArrayList list = new ArrayList(); list.add("PML over TCP Socket"); return list; } /** * Tell the reader to stop processing * @throws IOException when communication with the reader failed */ public void terminate() throws IOException { } /** * Provides the status of the antenna * @param antennaId the antenna identifier String * @return a String indicating the antenna status * @throws NotSupportedException if the operation is not supported by the reader */ public String getAntennaStatus(String antennaId) throws NotSupportedException { return "N/A"; } /** * Gets the antenna power attenuation level * @param antennaId the antenna identifier String * @return the power level * @throws IOException if an error occurred communicating with the device * @throws NotSupportedException if the operation is not supported by the reader */ public int getAntennaPower(String antennaId) throws IOException, NotSupportedException { return -1; } /** * Sets the antenna power attenuation level * @param antennaId the antenna identifier String * @param level the power level * @return the new power level * @throws IOException if an error occurred communicating with the device * @throws NotSupportedException if the operation is not supported by the reader * @throws OutOfRangeException if the specified value is out of range */ public int setAntennaPower(String antennaId, int level) throws IOException, NotSupportedException, OutOfRangeException { return -1; } /** * Turn on or off Indicators attached to the reader. * The number of indicators (if any) supported is reader dependent. * @param indicators An array of indicators to control. * @throws IOException if an error occurred communicating with the device * @throws NotSupportedException if the operation is not supported by the reader * @throws OutOfRangeException if the specified value is out of range * @throws TimeoutException if the reader did not reply within the default timeout * @throws ConnectionResetException if the connection to the reader has been lost */ public void changeIndicators(Indicator [] indicators) throws IOException, NotSupportedException, OutOfRangeException, ConnectionResetException, TimeoutException { // TODO put your code here throw new NotSupportedException(); } }
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -