Home | History | Annotate | Download | only in util

Lines Matching refs:charset

49      * the specified charset is not supported, default system encoding
55 * @param charset the desired character encoding
62 String charset
69 if (charset == null || charset.length() == 0) {
70 throw new IllegalArgumentException("charset may not be null or empty");
74 return new String(data, offset, length, charset);
83 * the specified charset is not supported, default system encoding
87 * @param charset the desired character encoding
90 public static String getString(final byte[] data, final String charset) {
94 return getString(data, 0, data.length, charset);
98 * Converts the specified string to a byte array. If the charset is not supported the
99 * default system charset is used.
102 * @param charset the desired character encoding
105 public static byte[] getBytes(final String data, final String charset) {
111 if (charset == null || charset.length() == 0) {
112 throw new IllegalArgumentException("charset may not be null or empty");
116 return data.getBytes(charset);