public Formatter(java.lang.Appendable arg0, java.util.Locale arg1) : base(global::MonoJavaBridge.JNIEnv.ThreadEnv) { global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv; global::MonoJavaBridge.JniLocalHandle handle = @__env.NewObject(java.util.Formatter.staticClass, global::java.util.Formatter._Formatter15424, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1)); Init(@__env, handle); }
/// <summary> /// Constructs a /// <code>Formatter</code> /// whose output is written to the specified /// <code>PrintStream</code> /// . /// <p>The charset of the /// <code>Formatter</code> /// is the default charset. /// <p>The /// <code>Locale</code> /// used is the user's default locale. /// See "<a href="../util/Locale.html#default_locale">Be wary of the default locale</a>". /// </summary> /// <param name="ps"> /// the /// <code>PrintStream</code> /// used as destination of the /// <code>Formatter</code> /// . If /// <code>ps</code> /// is /// <code>null</code> /// , then a /// <code>NullPointerException</code> /// will /// be raised. /// </param> public Formatter(java.io.PrintStream ps) { if (ps == null) { throw new System.ArgumentNullException(); } _out = ps; _locale = System.Globalization.CultureInfo.CurrentCulture; }
/// <summary> /// Constructs a /// <code>Formatter</code> /// whose output is written to the specified /// <code>OutputStream</code> /// . /// <p>The charset of the /// <code>Formatter</code> /// is the default charset. /// <p>The /// <code>Locale</code> /// used is the user's default locale. /// See "<a href="../util/Locale.html#default_locale">Be wary of the default locale</a>". /// </summary> /// <param name="os"> /// the stream to be used as the destination of the /// <code>Formatter</code> /// . /// </param> public Formatter(java.io.OutputStream os) { _out = new java.io.BufferedWriter(new java.io.OutputStreamWriter(os, java.nio.charset.Charset .defaultCharset())); _locale = System.Globalization.CultureInfo.CurrentCulture; }
/// <summary> /// Constructs a /// <code>Formatter</code> /// with the given /// <code>Locale</code> /// and charset, /// and whose output is written to the specified /// <code>OutputStream</code> /// . /// </summary> /// <param name="os"> /// the stream to be used as the destination of the /// <code>Formatter</code> /// . /// </param> /// <param name="csn"> /// the name of the charset for the /// <code>Formatter</code> /// . /// </param> /// <param name="l"> /// the /// <code>Locale</code> /// of the /// <code>Formatter</code> /// . If /// <code>l</code> /// is /// <code>null</code> /// , /// then no localization will be used. /// </param> /// <exception cref="java.io.UnsupportedEncodingException">if the charset with the specified name is not supported. /// </exception> public Formatter(java.io.OutputStream os, string csn, System.Globalization.CultureInfo l) { _out = new java.io.BufferedWriter(new java.io.OutputStreamWriter(os, csn)); _locale = l; }
/// <summary> /// Constructs a /// <code>Formatter</code> /// with the specified /// <code>Locale</code> /// and whose output will be written to the /// specified /// <code>Appendable</code> /// . /// </summary> /// <param name="a"> /// the output destination of the /// <code>Formatter</code> /// . If /// <code>a</code> /// is /// <code>null</code> /// , /// then a /// <code>StringBuilder</code> /// will be used. /// </param> /// <param name="l"> /// the /// <code>Locale</code> /// of the /// <code>Formatter</code> /// . If /// <code>l</code> /// is /// <code>null</code> /// , /// then no localization will be used. /// </param> public Formatter(java.lang.Appendable a, System.Globalization.CultureInfo l) { // User-settable parameters. // Implementation details. if (a == null) { _out = new java.lang.StringBuilder(); } else { _out = a; } _locale = l; }