本文整理匯總了Java中net.rim.device.api.util.TLEUtilities類的典型用法代碼示例。如果您正苦於以下問題:Java TLEUtilities類的具體用法?Java TLEUtilities怎麽用?Java TLEUtilities使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
TLEUtilities類屬於net.rim.device.api.util包,在下文中一共展示了TLEUtilities類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getEncodedStringFieldFromWptcpServiceRecord
import net.rim.device.api.util.TLEUtilities; //導入依賴的package包/類
/**
* Determines the String Value corresponding to the parameter tag from the WPTCP Service Record's encoded Application Data
*
* @param wptcpServiceRecord
* a WPTCP ServiceRecord. Must not be null.
*
* @param typeByteCode
* a byte representing the WPTCP Application Data specific parameter tag.
*
* @return a String representing the value assigned to the particular parameter tag or <b>null</b> if the encoded value does not exist.
*
*/
private static String getEncodedStringFieldFromWptcpServiceRecord( ServiceRecord wptcpServiceRecord, byte typeByteCode ) {
String stringData = null;
byte[] applicationData = wptcpServiceRecord.getApplicationData();
if( applicationData != null ) {
DataBuffer buffer = new DataBuffer( applicationData, 0, applicationData.length, true );
try {
// skip version
buffer.readByte();
if(TLEUtilities.findType(buffer, typeByteCode)){
stringData = TLEUtilities.readStringField(buffer, typeByteCode);
}
} catch( Throwable e ) {
}
}
return stringData;
}
示例2: getEncodedIntFieldFromWptcpServiceRecord
import net.rim.device.api.util.TLEUtilities; //導入依賴的package包/類
/**
* Determines the int Value corresponding to the parameter tag from the WPTCP Service Record's encoded Application Data
*
* @param wptcpServiceRecord
* a WPTCP ServiceRecord. Must not be null.
*
* @param typeByteCode
* a byte representing the WPTCP Application Data specific parameter tag.
*
* @return an int representing the value assigned to the particular parameter tag or <b>null</b> if the encoded value does not exist.
*
*/
private static int getEncodedIntFieldFromWptcpServiceRecord( ServiceRecord wptcpServiceRecord, byte typeByteCode ) {
int intData = -1;
byte[] applicationData = wptcpServiceRecord.getApplicationData();
if( applicationData != null ) {
DataBuffer buffer = new DataBuffer( applicationData, 0, applicationData.length, true );
try {
// skip version
buffer.readByte();
if(TLEUtilities.findType(buffer, typeByteCode)){
intData = TLEUtilities.readIntegerField(buffer, typeByteCode);
}
} catch( Throwable e ) {
}
}
return intData;
}
示例3: getEncodedStringFieldFromWapServiceRecord
import net.rim.device.api.util.TLEUtilities; //導入依賴的package包/類
/**
* Determines the String Value corresponding to the parameter tag from the WAP Service Record's encoded Application Data
*
* @param wapServiceRecord
* an WAP ServiceRecord
*
* @param typeByteCode
* a byte representing the WAP Application Data specific parameter tag
*
* @return a String representing the value assigned to the particular parameter tag or <b>null</b> if the encoded value does not exist.
*
*/
private static String getEncodedStringFieldFromWapServiceRecord( ServiceRecord wapServiceRecord, byte typeByteCode ) {
String stringData = null;
byte[] applicationData = wapServiceRecord.getApplicationData();
if( applicationData != null ) {
DataBuffer buffer = new DataBuffer( applicationData, 0, applicationData.length, true );
try {
//skip version
buffer.readByte();
if(TLEUtilities.findType(buffer, typeByteCode)){
stringData = TLEUtilities.readStringField(buffer, typeByteCode);
}
} catch( Throwable e ) {
}
}
return stringData;
}
示例4: getEncodedIntFieldFromWptcpServiceRecord
import net.rim.device.api.util.TLEUtilities; //導入依賴的package包/類
/**
* Determines the int Value corresponding to the parameter tag from the WPTCP Service Record's
* encoded Application Data
*
* @param wptcpServiceRecord a WPTCP ServiceRecord. Must not be null.
* @param typeByteCode a byte representing the WPTCP Application Data specific parameter tag.
* @return an int representing the value assigned to the particular parameter tag or <b>null</b>
* if the encoded value does not exist.
*/
private static int getEncodedIntFieldFromWptcpServiceRecord(ServiceRecord wptcpServiceRecord,
byte typeByteCode) {
int intData = -1;
byte[] applicationData = wptcpServiceRecord.getApplicationData();
if (applicationData != null) {
DataBuffer buffer = new DataBuffer(applicationData, 0, applicationData.length, true);
try {
// skip version
buffer.readByte();
if (TLEUtilities.findType(buffer, typeByteCode)) {
intData = TLEUtilities.readIntegerField(buffer, typeByteCode);
}
} catch (Throwable ignored) {
}
}
return intData;
}
示例5: getEncodedStringFieldFromWapServiceRecord
import net.rim.device.api.util.TLEUtilities; //導入依賴的package包/類
/**
* Determines the String Value corresponding to the parameter tag from the WAP Service Record's
* encoded Application Data
*
* @param wapServiceRecord an WAP ServiceRecord
* @param typeByteCode a byte representing the WAP Application Data specific parameter tag
* @return a String representing the value assigned to the particular parameter tag or <b>null</b>
* if the encoded value does not exist.
*/
private static String getEncodedStringFieldFromWapServiceRecord(ServiceRecord wapServiceRecord,
byte typeByteCode) {
String stringData = null;
byte[] applicationData = wapServiceRecord.getApplicationData();
if (applicationData != null) {
DataBuffer buffer = new DataBuffer(applicationData, 0, applicationData.length, true);
try {
// skip version
buffer.readByte();
if (TLEUtilities.findType(buffer, typeByteCode)) {
stringData = TLEUtilities.readStringField(buffer, typeByteCode);
}
} catch (Throwable ignored) {
}
}
return stringData;
}
示例6: getEncodedStringFieldFromWptcpServiceRecord
import net.rim.device.api.util.TLEUtilities; //導入依賴的package包/類
/**
* Determines the String Value corresponding to the parameter tag from the WPTCP Service Record's
* encoded Application Data
*
* @param wptcpServiceRecord a WPTCP ServiceRecord. Must not be null.
* @param typeByteCode a byte representing the WPTCP Application Data specific parameter tag.
* @return a String representing the value assigned to the particular parameter tag or <b>null</b>
* if the encoded value does not exist.
*/
private static String getEncodedStringFieldFromWptcpServiceRecord(
ServiceRecord wptcpServiceRecord, byte typeByteCode) {
String stringData = null;
byte[] applicationData = wptcpServiceRecord.getApplicationData();
if (applicationData != null) {
DataBuffer buffer = new DataBuffer(applicationData, 0, applicationData.length, true);
try {
// skip version
buffer.readByte();
if (TLEUtilities.findType(buffer, typeByteCode)) {
stringData = TLEUtilities.readStringField(buffer, typeByteCode);
}
} catch (Throwable ignored) {
}
}
return stringData;
}