当前位置: 首页>>代码示例>>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;未经允许,请勿转载。