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


Java Charsets.ISO_8859_1屬性代碼示例

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


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

示例1: newStringIso8859_1

public static String newStringIso8859_1(byte[] bytes) {
    return new String(bytes, Charsets.ISO_8859_1);
}
 
開發者ID:Qwaz,項目名稱:solved-hacking-problem,代碼行數:3,代碼來源:StringUtils.java

示例2: newStringIso8859_1

/**
 * Constructs a new <code>String</code> by decoding the specified array of bytes using the ISO-8859-1 charset.
 *
 * @param bytes
 *            The bytes to be decoded into characters, may be {@code null}
 * @return A new <code>String</code> decoded from the specified array of bytes using the ISO-8859-1 charset, or
 *         {@code null} if the input byte array was {@code null}.
 * @throws NullPointerException
 *             Thrown if {@link Charsets#ISO_8859_1} is not initialized, which should never happen since it is
 *             required by the Java platform specification.
 * @since As of 1.7, throws {@link NullPointerException} instead of UnsupportedEncodingException
 */
public static String newStringIso8859_1(final byte[] bytes) {
    return new String(bytes, Charsets.ISO_8859_1);
}
 
開發者ID:Becavalier,項目名稱:QRDataTransfer-Android,代碼行數:15,代碼來源:StringUtils.java

示例3: newStringIso8859_1

/**
 * Constructs a new <code>String</code> by decoding the specified array of bytes using the ISO-8859-1 charset.
 *
 * @param bytes
 *            The bytes to be decoded into characters, may be <code>null</code>
 * @return A new <code>String</code> decoded from the specified array of bytes using the ISO-8859-1 charset, or
 *         <code>null</code> if the input byte array was <code>null</code>.
 * @throws NullPointerException
 *             Thrown if {@link Charsets#ISO_8859_1} is not initialized, which should never happen since it is
 *             required by the Java platform specification.
 * @since As of 1.7, throws {@link NullPointerException} instead of UnsupportedEncodingException
 */
public static String newStringIso8859_1(final byte[] bytes) {
    return new String(bytes, Charsets.ISO_8859_1);
}
 
開發者ID:Its-its,項目名稱:AltManager,代碼行數:15,代碼來源:StringUtils.java


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