Exemplo n.º 1
0
        /// <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);
        }
Exemplo n.º 2
0
 /// <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);
 }
Exemplo n.º 3
0
 /// <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);
 }
Exemplo n.º 4
0
 /// <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);
     }
 }