|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.device.api.io.nfc.ndef.NDEFRecord
net.rim.device.api.io.nfc.ndef.rtd.URIRecord
public class URIRecord
Helps build and parse NFC Forum URI NDEF records.
| Field Summary | ||
|---|---|---|
static String |
URI_RECORD_TYPE
The NFC Forum record type name for URI records |
|
| Fields inherited from class net.rim.device.api.io.nfc.ndef.NDEFRecord |
|---|
TNF_ABSOLUTE_URI, TNF_ANY, TNF_EMPTY, TNF_EXTERNAL, TNF_MEDIA, TNF_UNCHANGED, TNF_UNKNOWN, TNF_WELL_KNOWN |
| Constructor Summary | ||
|---|---|---|
URIRecord()
Creates an empty URI record. |
||
URIRecord(String uri)
Creates a URI record with the specified URI. |
||
URIRecord(NDEFRecord ndefRecord)
Creates a URI record by extracting URI record data from an existing NDEFRecord object. |
||
| Method Summary | ||
|---|---|---|
NDEFRecord |
clone()
Returns an NDEFRecord object that is a clone of this URI record. |
|
byte[] |
getPayload()
Returns the payload for this URI record as a byte[] array. |
|
String |
getUri()
Returns the URI contained in the NDEF record. |
|
void |
setPayload(byte[] payload)
This method is not supported because the payload is generated. |
|
void |
setUri(String uri)
Sets the URI contained in the NDEF record. |
|
| Methods inherited from class net.rim.device.api.io.nfc.ndef.NDEFRecord |
|---|
getId, getType, getTypeNameFormat, isFirstRecord, isLastRecord, setId, setType |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String URI_RECORD_TYPE
| Constructor Detail |
|---|
public URIRecord()
throws NFCException
NFCException - If the URIRecord cannot be constructed.
public URIRecord(String uri)
throws NFCException
NFCException - If the URIRecord cannot be constructed.
public URIRecord(NDEFRecord ndefRecord)
throws NFCException
NDEFRecord object.
ndefRecord - NDEFRecord to extract data from.
NFCException - If the URIRecord cannot be constructed.| Method Detail |
|---|
public String getUri()
public void setUri(String uri)
uri - URI to store in the NDEF record.
IllegalArgumentException - If the uri parameter is null.public byte[] getPayload()
byte[] array.
Note that the payload is generated each time this method is called.
getPayload in class NDEFRecordbyte[] representation of the payload for the URI record.public void setPayload(byte[] payload)
setPayload in class NDEFRecordpayload - This parameter is not used.public NDEFRecord clone()
NDEFRecord object that is a clone of this URI record.
clone in class NDEFRecordNDEFRecord that is a clone of this URI Record.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal