Ejemplo n.º 1
0
        /// <summary>
        /// Creates an InputStreamReader that uses the named charset.
        /// </summary>
        /// <param name="in">
        ///         An InputStream
        /// </param>
        /// <param name="charsetName">
        ///         The name of a supported
        ///         <seealso cref="java.nio.charset.Charset charset"/>
        /// </param>
        /// <exception cref="UnsupportedEncodingException">
        ///             If the named charset is not supported </exception>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public InputStreamReader(InputStream in, String charsetName) throws UnsupportedEncodingException
        public InputStreamReader(InputStream @in, String charsetName) : base(@in)
        {
            if (charsetName == null)
            {
                throw new NullPointerException("charsetName");
            }
            Sd = StreamDecoder.forInputStreamReader(@in, this, charsetName);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Creates an InputStreamReader that uses the given charset decoder.
 /// </summary>
 /// <param name="in">       An InputStream </param>
 /// <param name="dec">      A charset decoder
 ///
 /// @since 1.4
 /// @spec JSR-51 </param>
 public InputStreamReader(InputStream @in, CharsetDecoder dec) : base(@in)
 {
     if (dec == null)
     {
         throw new NullPointerException("charset decoder");
     }
     Sd = StreamDecoder.forInputStreamReader(@in, this, dec);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Creates an InputStreamReader that uses the given charset.
 /// </summary>
 /// <param name="in">       An InputStream </param>
 /// <param name="cs">       A charset
 ///
 /// @since 1.4
 /// @spec JSR-51 </param>
 public InputStreamReader(InputStream @in, Charset cs) : base(@in)
 {
     if (cs == null)
     {
         throw new NullPointerException("charset");
     }
     Sd = StreamDecoder.forInputStreamReader(@in, this, cs);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Creates an InputStreamReader that uses the default charset.
 /// </summary>
 /// <param name="in">   An InputStream </param>
 public InputStreamReader(InputStream @in) : base(@in)
 {
     try
     {
         Sd = StreamDecoder.forInputStreamReader(@in, this, (String)null);                 // ## check lock object
     }
     catch (UnsupportedEncodingException e)
     {
         // The default encoding should always be available
         throw new Error(e);
     }
 }