/// <summary> /// Creates an OutputStreamWriter that uses the named charset. /// </summary> /// <param name="out"> /// An OutputStream /// </param> /// <param name="charsetName"> /// The name of a supported /// <seealso cref="java.nio.charset.Charset charset"/> /// </param> /// <exception cref="UnsupportedEncodingException"> /// If the named encoding is not supported </exception> //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public OutputStreamWriter(OutputStream out, String charsetName) throws UnsupportedEncodingException public OutputStreamWriter(OutputStream @out, String charsetName) : base(@out) { if (charsetName == null) { throw new NullPointerException("charsetName"); } Se = StreamEncoder.forOutputStreamWriter(@out, this, charsetName); }
/// <summary> /// Creates an OutputStreamWriter that uses the given charset. /// </summary> /// <param name="out"> /// An OutputStream /// </param> /// <param name="cs"> /// A charset /// /// @since 1.4 /// @spec JSR-51 </param> public OutputStreamWriter(OutputStream @out, Charset cs) : base(@out) { if (cs == null) { throw new NullPointerException("charset"); } Se = StreamEncoder.forOutputStreamWriter(@out, this, cs); }
/// <summary> /// Creates an OutputStreamWriter that uses the given charset encoder. /// </summary> /// <param name="out"> /// An OutputStream /// </param> /// <param name="enc"> /// A charset encoder /// /// @since 1.4 /// @spec JSR-51 </param> public OutputStreamWriter(OutputStream @out, CharsetEncoder enc) : base(@out) { if (enc == null) { throw new NullPointerException("charset encoder"); } Se = StreamEncoder.forOutputStreamWriter(@out, this, enc); }
/// <summary> /// Creates an OutputStreamWriter that uses the default character encoding. /// </summary> /// <param name="out"> An OutputStream </param> public OutputStreamWriter(OutputStream @out) : base(@out) { try { Se = StreamEncoder.forOutputStreamWriter(@out, this, (String)null); } catch (UnsupportedEncodingException e) { throw new Error(e); } }