Home
last modified time | relevance | path

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

123

/external/icu/icu4j/main/classes/charset/src/com/ibm/icu/charset/
DCharsetProviderICU.java52 public final Charset charsetForName(String charsetName){ in charsetForName() argument
56 if (charsetName.endsWith(UConverterConstants.OPTION_SWAP_LFNL_STRING)) { in charsetForName()
59charsetName = charsetName.substring(0, charsetName.length() - optionsString.length()); in charsetForName()
62 String icuCanonicalName = getICUCanonicalName(charsetName); in charsetForName()
68 icuCanonicalName = charsetName; in charsetForName()
89 public final Charset charsetForName(String charsetName, String classPath) { in charsetForName() argument
90 return charsetForName(charsetName, classPath, null); in charsetForName()
102 public Charset charsetForName(String charsetName, String classPath, ClassLoader loader) { in charsetForName() argument
105 cs = new CharsetMBCS(charsetName, charsetName, new String[0], classPath, loader); in charsetForName()
176 public static String getJavaCanonicalName(String charsetName){ in getJavaCanonicalName() argument
[all …]
DCharsetICU.java261 …public static Charset forNameICU(String charsetName) throws IllegalCharsetNameException, Unsupport… in forNameICU() argument
263 CharsetICU cs = (CharsetICU) icuProvider.charsetForName(charsetName); in forNameICU()
267 return Charset.forName(charsetName); in forNameICU()
/external/apache-commons-lang/src/main/java/org/apache/commons/lang3/
DCharsets.java55 static Charset toCharset(final String charsetName) { in toCharset() argument
56 return charsetName == null ? Charset.defaultCharset() : Charset.forName(charsetName); in toCharset()
65 static String toCharsetName(final String charsetName) { in toCharsetName() argument
66 return charsetName == null ? Charset.defaultCharset().name() : charsetName; in toCharsetName()
/external/sl4a/Common/src/org/apache/commons/codec/binary/
DStringUtils.java150 public static byte[] getBytesUnchecked(String string, String charsetName) { in getBytesUnchecked() argument
155 return string.getBytes(charsetName); in getBytesUnchecked()
157 throw StringUtils.newIllegalStateException(charsetName, e); in getBytesUnchecked()
161 …private static IllegalStateException newIllegalStateException(String charsetName, UnsupportedEncod… in newIllegalStateException() argument
162 return new IllegalStateException(charsetName + ": " + e); in newIllegalStateException()
183 public static String newString(byte[] bytes, String charsetName) { in newString() argument
188 return new String(bytes, charsetName); in newString()
190 throw StringUtils.newIllegalStateException(charsetName, e); in newString()
/external/apache-commons-io/src/main/java/org/apache/commons/io/
DByteOrderMark.java68 private final String charsetName; field in ByteOrderMark
79 public ByteOrderMark(final String charsetName, final int... bytes) { in ByteOrderMark() argument
80 Objects.requireNonNull(charsetName, "charsetName"); in ByteOrderMark()
82 if (charsetName.isEmpty()) { in ByteOrderMark()
88 this.charsetName = charsetName; in ByteOrderMark()
145 return charsetName; in getCharsetName()
182 builder.append(charsetName); in toString()
DIOUtils.java1792 public static LineIterator lineIterator(final InputStream input, final String charsetName) { in lineIterator() argument
1793 return lineIterator(input, Charsets.toCharset(charsetName)); in lineIterator()
2139 …public static List<String> readLines(final InputStream input, final String charsetName) throws Unc… in readLines() argument
2140 return readLines(input, Charsets.toCharset(charsetName)); in readLines()
2688 …public static byte[] toByteArray(final Reader reader, final String charsetName) throws IOException… in toByteArray() argument
2689 return toByteArray(reader, Charsets.toCharset(charsetName)); in toByteArray()
2817 …public static char[] toCharArray(final InputStream inputStream, final String charsetName) throws I… in toCharArray() argument
2818 return toCharArray(inputStream, Charsets.toCharset(charsetName)); in toCharArray()
2883 public static InputStream toInputStream(final CharSequence input, final String charsetName) { in toInputStream() argument
2884 return toInputStream(input, Charsets.toCharset(charsetName)); in toInputStream()
[all …]
DCharsets.java205 public static Charset toCharset(final String charsetName) throws UnsupportedCharsetException { in toCharset() argument
206 return toCharset(charsetName, Charset.defaultCharset()); in toCharset()
218 …public static Charset toCharset(final String charsetName, final Charset defaultCharset) throws Uns… in toCharset() argument
219 return charsetName == null ? defaultCharset : Charset.forName(charsetName); in toCharset()
DFileUtils.java436 …static boolean contentEqualsIgnoreEOL(final File file1, final File file2, final String charsetName) in contentEqualsIgnoreEOL() argument
462 final Charset charset = Charsets.toCharset(charsetName); in contentEqualsIgnoreEOL()
2152 …public static LineIterator lineIterator(final File file, final String charsetName) throws IOExcept… in lineIterator() argument
2156 return IOUtils.lineIterator(inputStream, charsetName); in lineIterator()
2599 …public static String readFileToString(final File file, final Charset charsetName) throws IOExcepti… in readFileToString() argument
2601 return IOUtils.toString(inputStream, Charsets.toCharset(charsetName)); in readFileToString()
2619 …public static String readFileToString(final File file, final String charsetName) throws IOExceptio… in readFileToString() argument
2620 return readFileToString(file, Charsets.toCharset(charsetName)); in readFileToString()
2672 …public static List<String> readLines(final File file, final String charsetName) throws IOException… in readLines() argument
2673 return readLines(file, Charsets.toCharset(charsetName)); in readLines()
[all …]
/external/apache-commons-io/src/main/java/org/apache/commons/io/output/
DFileWriterWithEncoding.java147 public FileWriterWithEncoding(final File file, final String charsetName) throws IOException { in FileWriterWithEncoding() argument
148 this(file, charsetName, false); in FileWriterWithEncoding()
161 …public FileWriterWithEncoding(final File file, final String charsetName, final boolean append) thr… in FileWriterWithEncoding() argument
162 super(initWriter(file, charsetName, append)); in FileWriterWithEncoding()
223 …public FileWriterWithEncoding(final String fileName, final String charsetName) throws IOException { in FileWriterWithEncoding() argument
224 this(new File(fileName), charsetName, false); in FileWriterWithEncoding()
236 …public FileWriterWithEncoding(final String fileName, final String charsetName, final boolean appen… in FileWriterWithEncoding() argument
237 this(new File(fileName), charsetName, append); in FileWriterWithEncoding()
DWriterOutputStream.java225 public WriterOutputStream(final Writer writer, final String charsetName) { in WriterOutputStream() argument
226 this(writer, charsetName, BUFFER_SIZE, false); in WriterOutputStream()
241 public WriterOutputStream(final Writer writer, final String charsetName, final int bufferSize, in WriterOutputStream() argument
243 this(writer, Charsets.toCharset(charsetName), bufferSize, writeImmediately); in WriterOutputStream()
DLockableFileWriter.java163 public LockableFileWriter(final File file, final String charsetName) throws IOException { in LockableFileWriter() argument
164 this(file, charsetName, false, null); in LockableFileWriter()
180 public LockableFileWriter(final File file, final String charsetName, final boolean append, in LockableFileWriter() argument
182 this(file, Charsets.toCharset(charsetName), append, lockDir); in LockableFileWriter()
/external/cronet/net/android/java/src/org/chromium/net/
DNetStringUtil.java33 String charsetName) { in convertToUnicode() argument
35 Charset charset = Charset.forName(charsetName); in convertToUnicode()
54 String charsetName) { in convertToUnicodeAndNormalize() argument
55 String unicodeString = convertToUnicode(text, charsetName); in convertToUnicodeAndNormalize()
71 String charsetName) { in convertToUnicodeWithSubstitutions() argument
73 Charset charset = Charset.forName(charsetName); in convertToUnicodeWithSubstitutions()
/external/apache-commons-compress/src/main/java/org/apache/commons/compress/archivers/zip/
DZipEncodingHelper.java71 static boolean isUTF8(String charsetName) { in isUTF8() argument
72 if (charsetName == null) { in isUTF8()
74 charsetName = Charset.defaultCharset().name(); in isUTF8()
76 if (StandardCharsets.UTF_8.name().equalsIgnoreCase(charsetName)) { in isUTF8()
80 if (alias.equalsIgnoreCase(charsetName)) { in isUTF8()
/external/apache-commons-io/src/test/java/org/apache/commons/io/input/
DReaderInputStreamTest.java88 …public void testCharsetEncoderFlush(final String charsetName, final String data) throws IOExceptio… in testCharsetEncoderFlush() argument
89 final Charset charset = Charset.forName(charsetName); in testCharsetEncoderFlush()
210 …private void testWithBufferedRead(final String testString, final String charsetName) throws IOExce… in testWithBufferedRead() argument
211 final byte[] expected = testString.getBytes(charsetName); in testWithBufferedRead()
212 … try (ReaderInputStream in = new ReaderInputStream(new StringReader(testString), charsetName)) { in testWithBufferedRead() argument
235 …private void testWithSingleByteRead(final String testString, final String charsetName) throws IOEx…
236 final byte[] bytes = testString.getBytes(charsetName);
237 … try (ReaderInputStream in = new ReaderInputStream(new StringReader(testString), charsetName)) {
DCharSequenceInputStreamTest.java126 …private void testBufferedRead(final String testString, final String charsetName) throws IOExceptio… in testBufferedRead() argument
127 final byte[] expected = testString.getBytes(charsetName); in testBufferedRead()
128 try (InputStream in = new CharSequenceInputStream(testString, charsetName, 512)) { in testBufferedRead() argument
135 …ssertEquals(expected.length, offset, "EOF: offset should equal length for charset " + charsetName); in testBufferedRead()
141 "offset for " + charsetName + " " + offset + " < " + expected.length); in testBufferedRead()
142 … assertEquals(expected[offset], buffer[bufferOffset], "bytes should agree for " + charsetName); in testBufferedRead()
384 …private void testSingleByteRead(final String testString, final String charsetName) throws IOExcept…
385 final byte[] bytes = testString.getBytes(charsetName);
386 try (InputStream in = new CharSequenceInputStream(testString, charsetName, 512)) {
DReversedLinesFileReaderTestParamFile.java90 …public void testDataIntegrityWithBufferedReader(final String fileName, final String charsetName, f… in testDataIntegrityWithBufferedReader() argument
101 final Charset charset = charsetName != null ? Charset.forName(charsetName) : null; in testDataIntegrityWithBufferedReader()
/external/apache-commons-io/src/test/java/org/apache/commons/io/output/
DWriterOutputStreamTest.java149 …private void testWithBufferedWrite(final String testString, final String charsetName) throws IOExc… in testWithBufferedWrite() argument
150 final byte[] expected = testString.getBytes(charsetName); in testWithBufferedWrite()
152 try (WriterOutputStream out = new WriterOutputStream(writer, charsetName)) { in testWithBufferedWrite() argument
186 …private void testWithSingleByteWrite(final String testString, final String charsetName) throws IOE… in testWithSingleByteWrite() argument
187 final byte[] bytes = testString.getBytes(Charsets.toCharset(charsetName)); in testWithSingleByteWrite()
189 try (WriterOutputStream out = new WriterOutputStream(writer, charsetName)) { in testWithSingleByteWrite() argument
/external/protobuf/javamicro/src/main/java/com/google/protobuf/micro/
DByteStringMicro.java100 public static ByteStringMicro copyFrom(final String text, final String charsetName) in copyFrom() argument
102 return new ByteStringMicro(text.getBytes(charsetName)); in copyFrom()
158 public String toString(final String charsetName) in toString() argument
160 return new String(bytes, charsetName); in toString()
/external/apache-commons-io/src/test/java/org/apache/commons/io/
DCopyUtilsTest.java102 final String charsetName = StandardCharsets.UTF_8.name(); in copy_inputStreamToWriterWithEncoding() local
104 CopyUtils.copy(new StringInputStream(inDataStr, charsetName), writer, charsetName); in copy_inputStreamToWriterWithEncoding()
182 final String charsetName = StandardCharsets.UTF_8.name(); in testCopy_byteArrayToWriterWithEncoding() local
184 CopyUtils.copy(inDataStr.getBytes(charsetName), writer, charsetName); in testCopy_byteArrayToWriterWithEncoding() local
/external/apache-commons-io/src/main/java/org/apache/commons/io/input/
DReaderInputStream.java218 public ReaderInputStream(final Reader reader, final String charsetName) { in ReaderInputStream() argument
219 this(reader, charsetName, DEFAULT_BUFFER_SIZE); in ReaderInputStream()
234 public ReaderInputStream(final Reader reader, final String charsetName, final int bufferSize) { in ReaderInputStream() argument
235 this(reader, Charsets.toCharset(charsetName), bufferSize); in ReaderInputStream()
DReversedLinesFileReader.java275 …public ReversedLinesFileReader(final File file, final int blockSize, final String charsetName) thr… in ReversedLinesFileReader() argument
276 this(file.toPath(), blockSize, charsetName); in ReversedLinesFileReader()
380 …public ReversedLinesFileReader(final Path file, final int blockSize, final String charsetName) thr… in ReversedLinesFileReader() argument
381 this(file, blockSize, Charsets.toCharset(charsetName)); in ReversedLinesFileReader()
/external/apache-commons-compress/src/main/java/org/apache/commons/compress/archivers/arj/
DArjArchiveInputStream.java46 private final String charsetName; field in ArjArchiveInputStream
59 final String charsetName) throws ArchiveException { in ArjArchiveInputStream() argument
61 this.charsetName = charsetName; in ArjArchiveInputStream()
115 if (charsetName != null) { in readString()
116 return new String(buffer.toByteArray(), charsetName); in readString()
/external/icu/android_icu4j/libcore_bridge/src/java/com/android/icu/charset/
DCharsetFactory.java49 public static Charset create(String charsetName) { in create() argument
50 return NativeConverter.charsetForName(charsetName); in create()
/external/javaparser/javaparser-symbol-solver-testing/src/test/test_sourcecode/javaparser_new_src/javaparser-generated-sources/com/github/javaparser/
DStreamProvider.java39 public StreamProvider(InputStream stream, String charsetName) throws IOException { in StreamProvider() argument
40 _reader = new BufferedReader(new InputStreamReader(stream, charsetName)); in StreamProvider()
/external/javaparser/javaparser-core/generated-sources/javacc/com/github/javaparser/
DStreamProvider.java47 public StreamProvider(InputStream stream, String charsetName) throws IOException { in StreamProvider() argument
48 _reader = new BufferedReader(new InputStreamReader(stream, charsetName)); in StreamProvider()

123