Home
last modified time | relevance | path

Searched refs:csn (Results 1 – 14 of 14) sorted by relevance

/libcore/ojluni/src/test/java/util/Scanner/
DEncodingTest.java61 String csn = StandardCharsets.UTF_8.name(); in getParameters() local
68 {ConstructorType.FILE, file1, file2, csn, charset}, in getParameters()
69 {ConstructorType.PATH, file1, file2, csn, charset}, in getParameters()
70 {ConstructorType.INPUTSTREAM, file1, file2, csn, charset}, in getParameters()
71 {ConstructorType.READABLEBYTECHANNEL, file1, file2, csn, charset},}; in getParameters()
86 void test(ConstructorType type, File file1, File file2, String csn, Charset charset) in test() argument
91 try (Scanner s1 = getScanner(type, file1.getPath(), csn, null); in test() argument
102 Scanner getScanner(ConstructorType type, String file, String csn, Charset charset) in getScanner() argument
104 if (csn != null) { in getScanner()
107 return new Scanner(new File(file), csn); in getScanner()
[all …]
/libcore/ojluni/src/test/java/io/PrintStream/
DEncodingTest.java59 String csn = StandardCharsets.UTF_8.name(); in getParameters() local
65 {ConstructorType.STRING, file1, file2, csn, charset}, in getParameters()
66 {ConstructorType.FILE, file1, file2, csn, charset}, in getParameters()
67 {ConstructorType.OUTPUTSTREAM, file1, file2, csn, charset} in getParameters()
82 public void test(ConstructorType type, File file1, File file2, String csn, Charset charset) in test() argument
84 createFile(getPrintStream(type, file1.getPath(), csn, null)); in test()
100 PrintStream getPrintStream(ConstructorType type, String path, String csn, Charset charset) in getPrintStream() argument
103 if (csn != null) { in getPrintStream()
106 out = new PrintStream(path, csn); in getPrintStream()
109 out = new PrintStream(new File(path), csn); in getPrintStream()
[all …]
/libcore/ojluni/src/test/java/io/PrintWriter/
DEncodingTest.java60 String csn = StandardCharsets.UTF_8.name(); in getParameters() local
66 {ConstructorType.STRING, file1, file2, csn, charset}, in getParameters()
67 {ConstructorType.FILE, file1, file2, csn, charset}, in getParameters()
68 {ConstructorType.OUTPUTSTREAM, file1, file2, csn, charset} in getParameters()
84 public void test(ConstructorType type, File file1, File file2, String csn, Charset charset) in test() argument
86 createFile(getWriter(type, file1.getPath(), csn, null)); in test()
102 PrintWriter getWriter(ConstructorType type, String path, String csn, Charset charset) in getWriter() argument
105 if (csn != null) { in getWriter()
108 out = new PrintWriter(path, csn); in getWriter()
111 out = new PrintWriter(new File(path), csn); in getWriter()
[all …]
/libcore/ojluni/src/test/java/nio/channels/Channels/
DEncodingTest.java201 public void testMalformedOutput(String fileName, String csn, Charset charset) in testMalformedOutput() argument
206 if (csn != null) { in testMalformedOutput()
207 writer = Channels.newWriter(wbc, csn); in testMalformedOutput()
230 …private void writeToFile(byte[] data, String fileName, String csn, Charset charset) throws Excepti… in writeToFile() argument
235 if (csn != null) { in writeToFile()
236 writer = Channels.newWriter(wbc, csn); in writeToFile()
237 temp = new String(data, csn); in writeToFile()
259 String readFileToString(String file, String csn, Charset charset) throws Exception { in readFileToString() argument
264 if (csn != null) { in readFileToString()
265 reader = Channels.newReader(rbc, csn); in readFileToString()
/libcore/ojluni/src/main/java/java/io/
DPrintWriter.java81 private static Charset toCharset(String csn) in toCharset() argument
84 Objects.requireNonNull(csn, "charsetName"); in toCharset()
86 return Charset.forName(csn); in toCharset()
89 throw new UnsupportedEncodingException(csn); in toCharset()
245 public PrintWriter(String fileName, String csn) in PrintWriter() argument
248 this(toCharset(csn), new File(fileName)); in PrintWriter()
346 public PrintWriter(File file, String csn) in PrintWriter() argument
349 this(toCharset(csn), file); in PrintWriter()
DPrintStream.java98 private static Charset toCharset(String csn) in toCharset() argument
101 requireNonNull(csn, "charsetName"); in toCharset()
103 return Charset.forName(csn); in toCharset()
106 throw new UnsupportedEncodingException(csn); in toCharset()
272 public PrintStream(String fileName, String csn) in PrintStream() argument
276 this(false, toCharset(csn), new FileOutputStream(fileName)); in PrintStream()
373 public PrintStream(File file, String csn) in PrintStream() argument
377 this(false, toCharset(csn), new FileOutputStream(file)); in PrintStream()
/libcore/ojluni/src/main/java/sun/nio/cs/
DStreamDecoder.java67 String csn = charsetName; in forInputStreamReader() local
68 if (csn == null) in forInputStreamReader()
69 csn = Charset.defaultCharset().name(); in forInputStreamReader()
71 if (Charset.isSupported(csn)) in forInputStreamReader()
72 return new StreamDecoder(in, lock, Charset.forName(csn)); in forInputStreamReader()
74 throw new UnsupportedEncodingException (csn); in forInputStreamReader()
DStreamEncoder.java54 String csn = charsetName; in forOutputStreamWriter() local
55 if (csn == null) in forOutputStreamWriter()
56 csn = Charset.defaultCharset().name(); in forOutputStreamWriter()
58 if (Charset.isSupported(csn)) in forOutputStreamWriter()
59 return new StreamEncoder(out, lock, Charset.forName(csn)); in forOutputStreamWriter()
61 throw new UnsupportedEncodingException (csn); in forOutputStreamWriter()
/libcore/ojluni/src/test/java/io/ByteArrayOutputStream/
DEncodingTest.java63 public void test(byte[] data, String csn, Charset charset) throws Exception { in test() argument
66 String str1 = baos.toString(csn); in test()
/libcore/ojluni/src/test/java/util/Properties/
DPropertiesTest.java96 private static Reader getReader(String src, String csn) in getReader() argument
100 csn); in getReader()
109 private static Writer getFOSW(String name, String csn) in getFOSW() argument
114 csn); in getFOSW()
117 private static Reader getReader(byte[] src, String csn) in getReader() argument
119 return new InputStreamReader(new ByteArrayInputStream(src), csn); in getReader()
/libcore/ojluni/annotations/sdk/nullability/java/io/
DPrintWriter.annotated.java48 ….NonNull java.lang.String fileName, @libcore.util.NonNull java.lang.String csn) throws java.io.Fil… in PrintWriter() argument
56 …ore.util.NonNull java.io.File file, @libcore.util.NonNull java.lang.String csn) throws java.io.Fil… in PrintWriter() argument
/libcore/ojluni/src/main/java/java/util/
DFormatter.java1955 private static Charset toCharset(String csn) in toCharset() argument
1958 Objects.requireNonNull(csn, "charsetName"); in toCharset()
1960 return Charset.forName(csn); in toCharset()
1963 throw new UnsupportedEncodingException(csn); in toCharset()
2117 public Formatter(String fileName, String csn) in Formatter() argument
2120 this(fileName, csn, Locale.getDefault(Locale.Category.FORMAT)); in Formatter()
2156 public Formatter(String fileName, String csn, Locale l) in Formatter() argument
2159 this(toCharset(csn), l, new File(fileName)); in Formatter()
2261 public Formatter(File file, String csn) in Formatter() argument
2264 this(file, csn, Locale.getDefault(Locale.Category.FORMAT)); in Formatter()
[all …]
DScanner.java610 private static Charset toCharset(String csn) { in toCharset() argument
611 Objects.requireNonNull(csn, "charsetName"); in toCharset()
613 return Charset.forName(csn); in toCharset()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
DPrintStreamTest.java58 …public MockPrintStream(String fileName, String csn) throws FileNotFoundException, UnsupportedEncod… in MockPrintStream() argument
59 super(fileName, csn); in MockPrintStream()