Lines Matching refs:charsetName
90 * stream and using the character encoding {@code charsetName} while writing. The
99 * @param charsetName
102 * if {@code out} or {@code charsetName} are {@code null}.
104 * if the encoding specified by {@code charsetName} is not supported.
106 public PrintStream(OutputStream out, boolean autoFlush, String charsetName)
111 } else if (charsetName == null) {
112 throw new NullPointerException("charsetName == null");
116 if (!Charset.isSupported(charsetName)) {
117 throw new UnsupportedEncodingException(charsetName);
120 throw new UnsupportedEncodingException(charsetName);
122 encoding = charsetName;
141 * character set named {@code charsetName} is used for character encoding.
146 * @param charsetName
151 * if {@code charsetName} is {@code null}.
153 * if the encoding specified by {@code charsetName} is not supported.
155 public PrintStream(File file, String charsetName) throws FileNotFoundException,
158 if (charsetName == null) {
159 throw new NullPointerException("charsetName == null");
161 if (!Charset.isSupported(charsetName)) {
162 throw new UnsupportedEncodingException(charsetName);
164 encoding = charsetName;
184 * {@code fileName} as its target. The character set named {@code charsetName} is
190 * @param charsetName
195 * if {@code charsetName} is {@code null}.
197 * if the encoding specified by {@code charsetName} is not supported.
199 public PrintStream(String fileName, String charsetName)
201 this(new File(fileName), charsetName);