Home
last modified time | relevance | path

Searched refs:charsetName (Results 1 – 25 of 66) sorted by relevance

123

/libcore/luni/src/main/java/java/nio/charset/
DIllegalCharsetNameException.java33 private String charsetName; field in IllegalCharsetNameException
42 public IllegalCharsetNameException(String charsetName) { in IllegalCharsetNameException() argument
43 super((charsetName != null) ? charsetName : "null"); in IllegalCharsetNameException()
44 this.charsetName = charsetName; in IllegalCharsetNameException()
51 return charsetName; in getCharsetName()
DUnsupportedCharsetException.java33 private String charsetName; field in UnsupportedCharsetException
42 public UnsupportedCharsetException(String charsetName) { in UnsupportedCharsetException() argument
43 super((charsetName != null) ? charsetName : "null"); in UnsupportedCharsetException()
44 this.charsetName = charsetName; in UnsupportedCharsetException()
53 return charsetName; in getCharsetName()
DCharset.java224 for (String charsetName : NativeConverter.getAvailableCharsetNames()) { in availableCharsets()
225 Charset charset = NativeConverter.charsetForName(charsetName); in availableCharsets()
244 private static Charset cacheCharset(String charsetName, Charset cs) { in cacheCharset() argument
260 CACHED_CHARSETS.put(charsetName, canonicalCharset); in cacheCharset()
280 public static Charset forName(String charsetName) { in forName() argument
284 cs = CACHED_CHARSETS.get(charsetName); in forName()
290 if (charsetName == null) { in forName()
295 checkCharsetName(charsetName); in forName()
296 cs = NativeConverter.charsetForName(charsetName); in forName()
298 return cacheCharset(charsetName, cs); in forName()
[all …]
/libcore/luni/src/main/java/java/io/
DPrintStream.java106 public PrintStream(OutputStream out, boolean autoFlush, String charsetName) in PrintStream() argument
111 } else if (charsetName == null) { in PrintStream()
116 if (!Charset.isSupported(charsetName)) { in PrintStream()
117 throw new UnsupportedEncodingException(charsetName); in PrintStream()
120 throw new UnsupportedEncodingException(charsetName); in PrintStream()
122 encoding = charsetName; in PrintStream()
155 public PrintStream(File file, String charsetName) throws FileNotFoundException, in PrintStream() argument
158 if (charsetName == null) { in PrintStream()
161 if (!Charset.isSupported(charsetName)) { in PrintStream()
162 throw new UnsupportedEncodingException(charsetName); in PrintStream()
[all …]
DInputStreamReader.java75 public InputStreamReader(InputStream in, final String charsetName) in InputStreamReader() argument
78 if (charsetName == null) { in InputStreamReader()
83 decoder = Charset.forName(charsetName).newDecoder().onMalformedInput( in InputStreamReader()
88 new UnsupportedEncodingException(charsetName).initCause(e); in InputStreamReader()
DOutputStreamWriter.java73 public OutputStreamWriter(OutputStream out, final String charsetName) in OutputStreamWriter() argument
76 if (charsetName == null) { in OutputStreamWriter()
81 encoder = Charset.forName(charsetName).newEncoder(); in OutputStreamWriter()
83 throw new UnsupportedEncodingException(charsetName); in OutputStreamWriter()
DByteArrayOutputStream.java174 public String toString(String charsetName) throws UnsupportedEncodingException { in toString() argument
175 return new String(buf, 0, count, charsetName); in toString()
/libcore/benchmarks/src/benchmarks/regression/
DCharsetForNameBenchmark.java38 private String charsetName; field in CharsetForNameBenchmark
42 Charset.forName(charsetName); in timeCharsetForName()
/libcore/luni/src/main/java/java/net/
DURLDecoder.java59 public static String decode(String s, String charsetName) throws UnsupportedEncodingException { in decode() argument
60 return UriCodec.decode(s, true, Charset.forName(charsetName), true); in decode()
DURLEncoder.java56 public static String encode(String s, String charsetName) throws UnsupportedEncodingException { in encode() argument
57 return ENCODER.encode(s, Charset.forName(charsetName)); in encode()
/libcore/luni/src/main/java/java/nio/channels/
DChannels.java151 String charsetName) { in newReader() argument
152 if (charsetName == null) { in newReader()
155 return newReader(channel, Charset.forName(charsetName).newDecoder(), -1); in newReader()
194 String charsetName) { in newWriter() argument
195 if (charsetName == null) { in newWriter()
198 return newWriter(channel, Charset.forName(charsetName).newEncoder(), -1); in newWriter()
/libcore/luni/src/test/java/libcore/java/nio/charset/
DSettableCharsetProvider.java50 public Charset charsetForName(String charsetName) { in charsetForName() argument
52 return delegate.charsetForName(charsetName); in charsetForName()
DOldCharset_SingleByte_windows_1258.java21 charsetName = "windows-1258"; in setUp()
DOldCharset_SingleByte_windows_1256.java21 charsetName = "windows-1256"; in setUp()
DOldCharset_SingleByte_windows_1253.java21 charsetName = "windows-1253"; in setUp()
DOldCharset_SingleByte_ISO_8859_13.java21 charsetName = "ISO-8859-13"; in setUp()
DOldCharset_SingleByte_ISO_8859_2.java21 charsetName = "ISO-8859-2"; in setUp()
DOldCharset_SingleByte_ISO_8859_6.java21 charsetName = "ISO-8859-6"; in setUp()
DOldCharset_SingleByte_ISO_8859_7.java21 charsetName = "ISO-8859-7"; in setUp()
DOldCharset_SingleByte_windows_1255.java21 charsetName = "windows-1255"; in setUp()
DOldCharset_SingleByte_ISO_8859_5.java21 charsetName = "ISO-8859-5"; in setUp()
DOldCharset_SingleByte_windows_1257.java21 charsetName = "windows-1257"; in setUp()
DOldCharset_SingleByte_windows_1252.java21 charsetName = "windows-1252"; in setUp()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/charset/
DCharsetTest.java46 for (String charsetName : Charset.availableCharsets().keySet()) { in test_allAvailableCharsets()
47 if (charsetName.equals("UTF-32")) { in test_allAvailableCharsets()
53 Charset cs = Charset.forName(charsetName); in test_allAvailableCharsets()
902 public Charset charsetForName(String charsetName) { in charsetForName() argument
903 if (Charset.isSupported(charsetName)) { in charsetForName()
904 return Charset.forName(charsetName); in charsetForName()
912 public Charset charsetForName(String charsetName) { in charsetForName() argument
913 if ("MockCharset00".equalsIgnoreCase(charsetName) || in charsetForName()
914 "MockCharset01".equalsIgnoreCase(charsetName) || in charsetForName()
915 "MockCharset02".equalsIgnoreCase(charsetName)) { in charsetForName()
[all …]
/libcore/luni/src/main/java/libcore/icu/
DNativeConverter.java24 public static native long openConverter(String charsetName); in openConverter() argument
40 public static native Charset charsetForName(String charsetName); in charsetForName() argument

123