當前位置: 首頁>>代碼示例>>Java>>正文


Java TLEUtilities類代碼示例

本文整理匯總了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;
}
 
開發者ID:codenameone,項目名稱:CodenameOne,代碼行數:30,代碼來源:TransportDetective.java

示例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;
}
 
開發者ID:codenameone,項目名稱:CodenameOne,代碼行數:30,代碼來源:TransportDetective.java

示例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;
}
 
開發者ID:codenameone,項目名稱:CodenameOne,代碼行數:31,代碼來源:TransportDetective.java

示例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;
}
 
開發者ID:yanex,項目名稱:vika,代碼行數:28,代碼來源:TransportDetective.java

示例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;
}
 
開發者ID:yanex,項目名稱:vika,代碼行數:29,代碼來源:TransportDetective.java

示例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;
}
 
開發者ID:yanex,項目名稱:vika,代碼行數:27,代碼來源:TransportDetective.java


注:本文中的net.rim.device.api.util.TLEUtilities類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。