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


Java StringUtils.newStringUsAscii方法代碼示例

本文整理匯總了Java中org.apache.commons.codec.binary.StringUtils.newStringUsAscii方法的典型用法代碼示例。如果您正苦於以下問題:Java StringUtils.newStringUsAscii方法的具體用法?Java StringUtils.newStringUsAscii怎麽用?Java StringUtils.newStringUsAscii使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.apache.commons.codec.binary.StringUtils的用法示例。


在下文中一共展示了StringUtils.newStringUsAscii方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: encode

import org.apache.commons.codec.binary.StringUtils; //導入方法依賴的package包/類
public String encode(String pString, String charset)
/* 194:    */     throws UnsupportedEncodingException
/* 195:    */   {
/* 196:382 */     if (pString == null) {
/* 197:383 */       return null;
/* 198:    */     }
/* 199:385 */     return StringUtils.newStringUsAscii(encode(pString.getBytes(charset)));
/* 200:    */   }
 
開發者ID:xiwc,項目名稱:confluence.keygen,代碼行數:9,代碼來源:QuotedPrintableCodec.java

示例2: encode

import org.apache.commons.codec.binary.StringUtils; //導入方法依賴的package包/類
public String encode(String pString, String charset)
/* 127:    */     throws UnsupportedEncodingException
/* 128:    */   {
/* 129:224 */     if (pString == null) {
/* 130:225 */       return null;
/* 131:    */     }
/* 132:227 */     return StringUtils.newStringUsAscii(encode(pString.getBytes(charset)));
/* 133:    */   }
 
開發者ID:xiwc,項目名稱:confluence.keygen,代碼行數:9,代碼來源:URLCodec.java

示例3: encode

import org.apache.commons.codec.binary.StringUtils; //導入方法依賴的package包/類
public String encode(String paramString1, String paramString2)
  throws UnsupportedEncodingException
{
  if (paramString1 == null)
    return null;
  return StringUtils.newStringUsAscii(encode(paramString1.getBytes(paramString2)));
}
 
開發者ID:zhangjianying,項目名稱:12306-android-Decompile,代碼行數:8,代碼來源:QuotedPrintableCodec.java

示例4: encode

import org.apache.commons.codec.binary.StringUtils; //導入方法依賴的package包/類
public String encode(String str, Charset charset) {
    if (str == null) {
        return null;
    }
    return StringUtils.newStringUsAscii(encode(str.getBytes(charset)));
}
 
開發者ID:Qwaz,項目名稱:solved-hacking-problem,代碼行數:7,代碼來源:QuotedPrintableCodec.java

示例5: encode

import org.apache.commons.codec.binary.StringUtils; //導入方法依賴的package包/類
public String encode(String str, String charset) throws UnsupportedEncodingException {
    if (str == null) {
        return null;
    }
    return StringUtils.newStringUsAscii(encode(str.getBytes(charset)));
}
 
開發者ID:Qwaz,項目名稱:solved-hacking-problem,代碼行數:7,代碼來源:URLCodec.java

示例6: encode

import org.apache.commons.codec.binary.StringUtils; //導入方法依賴的package包/類
/**
 * Encodes a string into its quoted-printable form using the specified charset. Unsafe characters are escaped.
 * <p>
 * Depending on the selection of the {@code strict} parameter, this function either implements the full ruleset
 * or only a subset of quoted-printable encoding specification (rule #1 and rule #2) as defined in
 * RFC 1521 and is suitable for encoding binary data and unformatted text.
 *
 * @param str
 *            string to convert to quoted-printable form
 * @param charset
 *            the charset for str
 * @return quoted-printable string
 * @since 1.7
 */
public String encode(final String str, final Charset charset) {
    if (str == null) {
        return null;
    }
    return StringUtils.newStringUsAscii(this.encode(str.getBytes(charset)));
}
 
開發者ID:HTBridge,項目名稱:pivaa,代碼行數:21,代碼來源:QuotedPrintableCodec.java

示例7: encode

import org.apache.commons.codec.binary.StringUtils; //導入方法依賴的package包/類
/**
 * Encodes a string into its URL safe form using the specified string charset. Unsafe characters are escaped.
 *
 * @param str
 *            string to convert to a URL safe form
 * @param charset
 *            the charset for str
 * @return URL safe string
 * @throws UnsupportedEncodingException
 *             Thrown if charset is not supported
 */
public String encode(final String str, final String charset) throws UnsupportedEncodingException {
    if (str == null) {
        return null;
    }
    return StringUtils.newStringUsAscii(encode(str.getBytes(charset)));
}
 
開發者ID:HTBridge,項目名稱:pivaa,代碼行數:18,代碼來源:URLCodec.java

示例8: URLEncode

import org.apache.commons.codec.binary.StringUtils; //導入方法依賴的package包/類
public static String URLEncode(byte[] bytes) {

        byte[] encodeURLBytes = URLCodec.encodeUrl(null, bytes);
        String encodeURLtext = StringUtils.newStringUsAscii(encodeURLBytes);

        return encodeURLtext;
    }
 
開發者ID:owenson,項目名稱:tor-research-framework,代碼行數:8,代碼來源:URLUtil.java

示例9: encode

import org.apache.commons.codec.binary.StringUtils; //導入方法依賴的package包/類
/**
 * Encodes a string into its quoted-printable form using the specified charset. Unsafe characters are escaped.
 * <p>
 * Depending on the selection of the {@code strict} parameter, this function either implements the full ruleset
 * or only a subset of quoted-printable encoding specification (rule #1 and rule #2) as defined in
 * RFC 1521 and is suitable for encoding binary data and unformatted text.
 *
 * @param str
 *            string to convert to quoted-printable form
 * @param charset
 *            the charset for str
 * @return quoted-printable string
 * @since 1.7
 */
public String encode(final String str, final Charset charset) {
    if (str == null) {
        return null;
    }
    return StringUtils.newStringUsAscii(this.encode(StringUtils.getBytesUnchecked(str, charset.name())));
}
 
開發者ID:ManfredTremmel,項目名稱:gwt-commons-codec,代碼行數:21,代碼來源:QuotedPrintableCodec.java


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