Udostępnij za pośrednictwem


Formatter Constructors

Definition

Overloads

Formatter()

Constructs a new formatter.

Formatter(String, String, Locale)

Constructs a new formatter with the specified file name, charset, and locale.

Formatter(String, Charset, Locale)

Constructs a new formatter with the specified file name, charset, and locale.

Formatter(Stream, String, Locale)

Constructs a new formatter with the specified output stream, charset, and locale.

Formatter(File, String, Locale)

Constructs a new formatter with the specified file, charset, and locale.

Formatter(File, Charset, Locale)

Constructs a new formatter with the specified file, charset, and locale.

Formatter(String, String)

Constructs a new formatter with the specified file name and charset.

Formatter(Stream, String)

Constructs a new formatter with the specified output stream and charset.

Formatter(Stream, Charset, Locale)

Constructs a new formatter with the specified output stream, charset, and locale.

Formatter(File, String)

Constructs a new formatter with the specified file and charset.

Formatter(String)

Constructs a new formatter with the specified file name.

Formatter(Stream)

Constructs a new formatter with the specified output stream.

Formatter(Locale)

Constructs a new formatter with the specified locale.

Formatter(IAppendable, Locale)

Constructs a new formatter with the specified destination and locale.

Formatter(IAppendable)

Constructs a new formatter with the specified destination.

Formatter(PrintStream)

Constructs a new formatter with the specified print stream.

Formatter(File)

Constructs a new formatter with the specified file.

Formatter()

Constructs a new formatter.

[Android.Runtime.Register(".ctor", "()V", "")]
public Formatter ();
Attributes

Remarks

Constructs a new formatter.

The destination of the formatted output is a StringBuilder which may be retrieved by invoking #out out() and whose current content may be converted into a string by invoking #toString toString(). The locale used is the Locale#getDefault(Locale.Category) default locale for Locale.Category#FORMAT formatting for this instance of the Java virtual machine.

Java documentation for java.util.Formatter.Formatter().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Formatter(String, String, Locale)

Constructs a new formatter with the specified file name, charset, and locale.

[Android.Runtime.Register(".ctor", "(Ljava/lang/String;Ljava/lang/String;Ljava/util/Locale;)V", "")]
public Formatter (string? fileName, string? csn, Java.Util.Locale? l);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;Ljava/lang/String;Ljava/util/Locale;)V", "")>]
new Java.Util.Formatter : string * string * Java.Util.Locale -> Java.Util.Formatter

Parameters

fileName
String

The name of the file to use as the destination of this formatter. If the file exists then it will be truncated to zero size; otherwise, a new file will be created. The output will be written to the file and is buffered.

csn
String

The name of a supported java.nio.charset.Charset charset

l
Locale

The java.util.Locale locale to apply during formatting. If l is null then no localization is applied.

Attributes

Exceptions

if the filename does not denote a normal and writable file, or if a new file cannot be created, or if any error arises when opening or creating the file.

if the charset with the specified name is not supported.

Remarks

Constructs a new formatter with the specified file name, charset, and locale.

Java documentation for java.util.Formatter.Formatter(java.lang.String, java.lang.String, java.util.Locale).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Formatter(String, Charset, Locale)

Constructs a new formatter with the specified file name, charset, and locale.

[Android.Runtime.Register(".ctor", "(Ljava/lang/String;Ljava/nio/charset/Charset;Ljava/util/Locale;)V", "", ApiSince=34)]
public Formatter (string? fileName, Java.Nio.Charset.Charset? charset, Java.Util.Locale? l);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;Ljava/nio/charset/Charset;Ljava/util/Locale;)V", "", ApiSince=34)>]
new Java.Util.Formatter : string * Java.Nio.Charset.Charset * Java.Util.Locale -> Java.Util.Formatter

Parameters

fileName
String

The name of the file to use as the destination of this formatter. If the file exists then it will be truncated to zero size; otherwise, a new file will be created. The output will be written to the file and is buffered.

charset
Charset

A java.nio.charset.Charset charset

l
Locale

The java.util.Locale locale to apply during formatting. If l is null then no localization is applied.

Attributes

Remarks

Constructs a new formatter with the specified file name, charset, and locale.

Java documentation for java.util.Formatter.Formatter(java.lang.String, java.nio.charset.Charset, java.util.Locale).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Formatter(Stream, String, Locale)

Constructs a new formatter with the specified output stream, charset, and locale.

[Android.Runtime.Register(".ctor", "(Ljava/io/OutputStream;Ljava/lang/String;Ljava/util/Locale;)V", "")]
public Formatter (System.IO.Stream? os, string? csn, Java.Util.Locale? l);
[<Android.Runtime.Register(".ctor", "(Ljava/io/OutputStream;Ljava/lang/String;Ljava/util/Locale;)V", "")>]
new Java.Util.Formatter : System.IO.Stream * string * Java.Util.Locale -> Java.Util.Formatter

Parameters

os
Stream

The output stream to use as the destination of this formatter. The output will be buffered.

csn
String

The name of a supported java.nio.charset.Charset charset

l
Locale

The java.util.Locale locale to apply during formatting. If l is null then no localization is applied.

Attributes

Exceptions

if the charset with the specified name is not supported.

Remarks

Constructs a new formatter with the specified output stream, charset, and locale.

Java documentation for java.util.Formatter.Formatter(java.io.OutputStream, java.lang.String, java.util.Locale).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Formatter(File, String, Locale)

Constructs a new formatter with the specified file, charset, and locale.

[Android.Runtime.Register(".ctor", "(Ljava/io/File;Ljava/lang/String;Ljava/util/Locale;)V", "")]
public Formatter (Java.IO.File? file, string? csn, Java.Util.Locale? l);
[<Android.Runtime.Register(".ctor", "(Ljava/io/File;Ljava/lang/String;Ljava/util/Locale;)V", "")>]
new Java.Util.Formatter : Java.IO.File * string * Java.Util.Locale -> Java.Util.Formatter

Parameters

file
File

The file to use as the destination of this formatter. If the file exists then it will be truncated to zero size; otherwise, a new file will be created. The output will be written to the file and is buffered.

csn
String

The name of a supported java.nio.charset.Charset charset

l
Locale

The java.util.Locale locale to apply during formatting. If l is null then no localization is applied.

Attributes

Exceptions

if the File is not a normal and writable File, or if a new File cannot be created, or if any error rises when opening or creating the File.

if the charset with the specified name is not supported.

Remarks

Constructs a new formatter with the specified file, charset, and locale.

Java documentation for java.util.Formatter.Formatter(java.io.File, java.lang.String, java.util.Locale).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Formatter(File, Charset, Locale)

Constructs a new formatter with the specified file, charset, and locale.

[Android.Runtime.Register(".ctor", "(Ljava/io/File;Ljava/nio/charset/Charset;Ljava/util/Locale;)V", "", ApiSince=34)]
public Formatter (Java.IO.File? file, Java.Nio.Charset.Charset? charset, Java.Util.Locale? l);
[<Android.Runtime.Register(".ctor", "(Ljava/io/File;Ljava/nio/charset/Charset;Ljava/util/Locale;)V", "", ApiSince=34)>]
new Java.Util.Formatter : Java.IO.File * Java.Nio.Charset.Charset * Java.Util.Locale -> Java.Util.Formatter

Parameters

file
File

The file to use as the destination of this formatter. If the file exists then it will be truncated to zero size; otherwise, a new file will be created. The output will be written to the file and is buffered.

charset
Charset

A java.nio.charset.Charset charset

l
Locale

The java.util.Locale locale to apply during formatting. If l is null then no localization is applied.

Attributes

Remarks

Constructs a new formatter with the specified file, charset, and locale.

Java documentation for java.util.Formatter.Formatter(java.io.File, java.nio.charset.Charset, java.util.Locale).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Formatter(String, String)

Constructs a new formatter with the specified file name and charset.

[Android.Runtime.Register(".ctor", "(Ljava/lang/String;Ljava/lang/String;)V", "")]
public Formatter (string? fileName, string? csn);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;Ljava/lang/String;)V", "")>]
new Java.Util.Formatter : string * string -> Java.Util.Formatter

Parameters

fileName
String

The name of the file to use as the destination of this formatter. If the file exists then it will be truncated to zero size; otherwise, a new file will be created. The output will be written to the file and is buffered.

csn
String

The name of a supported java.nio.charset.Charset charset

Attributes

Exceptions

if the filename does not denote a normal and writable file, or if a new file cannot be created, or if any error arises when opening or creating the file.

if the charset with the specified name is not supported.

Remarks

Constructs a new formatter with the specified file name and charset.

The locale used is the Locale#getDefault(Locale.Category) default locale for Locale.Category#FORMAT formatting for this instance of the Java virtual machine.

Java documentation for java.util.Formatter.Formatter(java.lang.String, java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Formatter(Stream, String)

Constructs a new formatter with the specified output stream and charset.

[Android.Runtime.Register(".ctor", "(Ljava/io/OutputStream;Ljava/lang/String;)V", "")]
public Formatter (System.IO.Stream? os, string? csn);
[<Android.Runtime.Register(".ctor", "(Ljava/io/OutputStream;Ljava/lang/String;)V", "")>]
new Java.Util.Formatter : System.IO.Stream * string -> Java.Util.Formatter

Parameters

os
Stream

The output stream to use as the destination of this formatter. The output will be buffered.

csn
String

The name of a supported java.nio.charset.Charset charset

Attributes

Exceptions

if the charset with the specified name is not supported.

Remarks

Constructs a new formatter with the specified output stream and charset.

The locale used is the Locale#getDefault(Locale.Category) default locale for Locale.Category#FORMAT formatting for this instance of the Java virtual machine.

Java documentation for java.util.Formatter.Formatter(java.io.OutputStream, java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Formatter(Stream, Charset, Locale)

Constructs a new formatter with the specified output stream, charset, and locale.

[Android.Runtime.Register(".ctor", "(Ljava/io/OutputStream;Ljava/nio/charset/Charset;Ljava/util/Locale;)V", "", ApiSince=34)]
public Formatter (System.IO.Stream? os, Java.Nio.Charset.Charset? charset, Java.Util.Locale? l);
[<Android.Runtime.Register(".ctor", "(Ljava/io/OutputStream;Ljava/nio/charset/Charset;Ljava/util/Locale;)V", "", ApiSince=34)>]
new Java.Util.Formatter : System.IO.Stream * Java.Nio.Charset.Charset * Java.Util.Locale -> Java.Util.Formatter

Parameters

os
Stream

The output stream to use as the destination of this formatter. The output will be buffered.

charset
Charset

A java.nio.charset.Charset charset

l
Locale

The java.util.Locale locale to apply during formatting. If l is null then no localization is applied.

Attributes

Remarks

Constructs a new formatter with the specified output stream, charset, and locale.

Java documentation for java.util.Formatter.Formatter(java.io.OutputStream, java.nio.charset.Charset, java.util.Locale).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Formatter(File, String)

Constructs a new formatter with the specified file and charset.

[Android.Runtime.Register(".ctor", "(Ljava/io/File;Ljava/lang/String;)V", "")]
public Formatter (Java.IO.File? file, string? csn);
[<Android.Runtime.Register(".ctor", "(Ljava/io/File;Ljava/lang/String;)V", "")>]
new Java.Util.Formatter : Java.IO.File * string -> Java.Util.Formatter

Parameters

file
File

The file to use as the destination of this formatter. If the file exists then it will be truncated to zero size; otherwise, a new file will be created. The output will be written to the file and is buffered.

csn
String

The name of a supported java.nio.charset.Charset charset

Attributes

Exceptions

if the File is not a normal and writable File, or if a new File cannot be created, or if any error rises when opening or creating the File.

if the charset with the specified name is not supported.

Remarks

Constructs a new formatter with the specified file and charset.

The locale used is the Locale#getDefault(Locale.Category) default locale for Locale.Category#FORMAT formatting for this instance of the Java virtual machine.

Java documentation for java.util.Formatter.Formatter(java.io.File, java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Formatter(String)

Constructs a new formatter with the specified file name.

[Android.Runtime.Register(".ctor", "(Ljava/lang/String;)V", "")]
public Formatter (string? fileName);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;)V", "")>]
new Java.Util.Formatter : string -> Java.Util.Formatter

Parameters

fileName
String

The name of the file to use as the destination of this formatter. If the file exists then it will be truncated to zero size; otherwise, a new file will be created. The output will be written to the file and is buffered.

Attributes

Exceptions

if the filename does not denote a normal and writable file, or if a new file cannot be created, or if any error arises when opening or creating the file.

Remarks

Constructs a new formatter with the specified file name.

The charset used is the java.nio.charset.Charset#defaultCharset() default charset for this instance of the Java virtual machine.

The locale used is the Locale#getDefault(Locale.Category) default locale for Locale.Category#FORMAT formatting for this instance of the Java virtual machine.

Java documentation for java.util.Formatter.Formatter(java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Formatter(Stream)

Constructs a new formatter with the specified output stream.

[Android.Runtime.Register(".ctor", "(Ljava/io/OutputStream;)V", "")]
public Formatter (System.IO.Stream? os);
[<Android.Runtime.Register(".ctor", "(Ljava/io/OutputStream;)V", "")>]
new Java.Util.Formatter : System.IO.Stream -> Java.Util.Formatter

Parameters

os
Stream

The output stream to use as the destination of this formatter. The output will be buffered.

Attributes

Remarks

Constructs a new formatter with the specified output stream.

The charset used is the java.nio.charset.Charset#defaultCharset() default charset for this instance of the Java virtual machine.

The locale used is the Locale#getDefault(Locale.Category) default locale for Locale.Category#FORMAT formatting for this instance of the Java virtual machine.

Java documentation for java.util.Formatter.Formatter(java.io.OutputStream).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Formatter(Locale)

Constructs a new formatter with the specified locale.

[Android.Runtime.Register(".ctor", "(Ljava/util/Locale;)V", "")]
public Formatter (Java.Util.Locale? l);
[<Android.Runtime.Register(".ctor", "(Ljava/util/Locale;)V", "")>]
new Java.Util.Formatter : Java.Util.Locale -> Java.Util.Formatter

Parameters

l
Locale

The java.util.Locale locale to apply during formatting. If l is null then no localization is applied.

Attributes

Remarks

Constructs a new formatter with the specified locale.

The destination of the formatted output is a StringBuilder which may be retrieved by invoking #out out() and whose current content may be converted into a string by invoking #toString toString().

Java documentation for java.util.Formatter.Formatter(java.util.Locale).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Formatter(IAppendable, Locale)

Constructs a new formatter with the specified destination and locale.

[Android.Runtime.Register(".ctor", "(Ljava/lang/Appendable;Ljava/util/Locale;)V", "")]
public Formatter (Java.Lang.IAppendable? a, Java.Util.Locale? l);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/Appendable;Ljava/util/Locale;)V", "")>]
new Java.Util.Formatter : Java.Lang.IAppendable * Java.Util.Locale -> Java.Util.Formatter

Parameters

a
IAppendable

Destination for the formatted output. If a is null then a StringBuilder will be created.

l
Locale

The java.util.Locale locale to apply during formatting. If l is null then no localization is applied.

Attributes

Remarks

Constructs a new formatter with the specified destination and locale.

Java documentation for java.util.Formatter.Formatter(java.lang.Appendable, java.util.Locale).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Formatter(IAppendable)

Constructs a new formatter with the specified destination.

[Android.Runtime.Register(".ctor", "(Ljava/lang/Appendable;)V", "")]
public Formatter (Java.Lang.IAppendable? a);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/Appendable;)V", "")>]
new Java.Util.Formatter : Java.Lang.IAppendable -> Java.Util.Formatter

Parameters

a
IAppendable

Destination for the formatted output. If a is null then a StringBuilder will be created.

Attributes

Remarks

Constructs a new formatter with the specified destination.

The locale used is the Locale#getDefault(Locale.Category) default locale for Locale.Category#FORMAT formatting for this instance of the Java virtual machine.

Java documentation for java.util.Formatter.Formatter(java.lang.Appendable).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Formatter(PrintStream)

Constructs a new formatter with the specified print stream.

[Android.Runtime.Register(".ctor", "(Ljava/io/PrintStream;)V", "")]
public Formatter (Java.IO.PrintStream? ps);
[<Android.Runtime.Register(".ctor", "(Ljava/io/PrintStream;)V", "")>]
new Java.Util.Formatter : Java.IO.PrintStream -> Java.Util.Formatter

Parameters

ps
PrintStream

The stream to use as the destination of this formatter.

Attributes

Remarks

Constructs a new formatter with the specified print stream.

The locale used is the Locale#getDefault(Locale.Category) default locale for Locale.Category#FORMAT formatting for this instance of the Java virtual machine.

Characters are written to the given java.io.PrintStream PrintStream object and are therefore encoded using that object's charset.

Java documentation for java.util.Formatter.Formatter(java.io.PrintStream).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Formatter(File)

Constructs a new formatter with the specified file.

[Android.Runtime.Register(".ctor", "(Ljava/io/File;)V", "")]
public Formatter (Java.IO.File? file);
[<Android.Runtime.Register(".ctor", "(Ljava/io/File;)V", "")>]
new Java.Util.Formatter : Java.IO.File -> Java.Util.Formatter

Parameters

file
File

The file to use as the destination of this formatter. If the file exists then it will be truncated to zero size; otherwise, a new file will be created. The output will be written to the file and is buffered.

Attributes

Exceptions

if the File is not a normal and writable File, or if a new File cannot be created, or if any error rises when opening or creating the File.

Remarks

Constructs a new formatter with the specified file.

The charset used is the java.nio.charset.Charset#defaultCharset() default charset for this instance of the Java virtual machine.

The locale used is the Locale#getDefault(Locale.Category) default locale for Locale.Category#FORMAT formatting for this instance of the Java virtual machine.

Java documentation for java.util.Formatter.Formatter(java.io.File).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to