Udostępnij za pośrednictwem


FileHandler Constructors

Definition

Overloads

FileHandler()

Construct a default FileHandler.

FileHandler(String)

Initialize a FileHandler to write to the given filename.

FileHandler(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

FileHandler(String, Boolean)

Initialize a FileHandler to write to the given filename, with optional append.

FileHandler(String, Int32, Int32)

Initialize a FileHandler to write to a set of files.

FileHandler(String, Int32, Int32, Boolean)

Initialize a FileHandler to write to a set of files with optional append.

FileHandler()

Construct a default FileHandler.

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

Exceptions

if any I/O error occurs.

Remarks

Construct a default FileHandler. This will be configured entirely from LogManager properties (or their default values).

Java documentation for java.util.logging.FileHandler.FileHandler().

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

FileHandler(String)

Initialize a FileHandler to write to the given filename.

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

Parameters

pattern
String

the name of the output file

Attributes

Exceptions

if any I/O error occurs.

if the pattern is empty.

if the pattern is null.

Remarks

Initialize a FileHandler to write to the given filename.

The FileHandler is configured based on LogManager properties (or their default values) except that the given pattern argument is used as the filename pattern, the file limit is set to no limit, and the file count is set to one.

There is no limit on the amount of data that may be written, so use this with care.

Java documentation for java.util.logging.FileHandler.FileHandler(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

FileHandler(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

protected FileHandler (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Java.Util.Logging.FileHandler : nativeint * Android.Runtime.JniHandleOwnership -> Java.Util.Logging.FileHandler

Parameters

javaReference
IntPtr

nativeint

A IntPtrcontaining a Java Native Interface (JNI) object reference.

transfer
JniHandleOwnership

A JniHandleOwnershipindicating how to handle javaReference

Remarks

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

FileHandler(String, Boolean)

Initialize a FileHandler to write to the given filename, with optional append.

[Android.Runtime.Register(".ctor", "(Ljava/lang/String;Z)V", "")]
public FileHandler (string? pattern, bool append);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;Z)V", "")>]
new Java.Util.Logging.FileHandler : string * bool -> Java.Util.Logging.FileHandler

Parameters

pattern
String

the name of the output file

append
Boolean

specifies append mode

Attributes

Exceptions

if any I/O error occurs.

if pattern is empty.

if pattern is null.

Remarks

Initialize a FileHandler to write to the given filename, with optional append.

The FileHandler is configured based on LogManager properties (or their default values) except that the given pattern argument is used as the filename pattern, the file limit is set to no limit, the file count is set to one, and the append mode is set to the given append argument.

There is no limit on the amount of data that may be written, so use this with care.

Java documentation for java.util.logging.FileHandler.FileHandler(java.lang.String, boolean).

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

FileHandler(String, Int32, Int32)

Initialize a FileHandler to write to a set of files.

[Android.Runtime.Register(".ctor", "(Ljava/lang/String;II)V", "")]
public FileHandler (string? pattern, int limit, int count);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;II)V", "")>]
new Java.Util.Logging.FileHandler : string * int * int -> Java.Util.Logging.FileHandler

Parameters

pattern
String

the pattern for naming the output file

limit
Int32

the maximum number of bytes to write to any one file

count
Int32

the number of files to use

Attributes

Exceptions

if any I/O error occurs.

if pattern is empty, limit or count .

if pattern is null.

Remarks

Initialize a FileHandler to write to a set of files. When (approximately) the given limit has been written to one file, another file will be opened. The output will cycle through a set of count files.

The FileHandler is configured based on LogManager properties (or their default values) except that the given pattern argument is used as the filename pattern, the file limit is set to the limit argument, and the file count is set to the given count argument.

The count must be at least 1.

Java documentation for java.util.logging.FileHandler.FileHandler(java.lang.String, int, int).

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

FileHandler(String, Int32, Int32, Boolean)

Initialize a FileHandler to write to a set of files with optional append.

[Android.Runtime.Register(".ctor", "(Ljava/lang/String;IIZ)V", "")]
public FileHandler (string? pattern, int limit, int count, bool append);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;IIZ)V", "")>]
new Java.Util.Logging.FileHandler : string * int * int * bool -> Java.Util.Logging.FileHandler

Parameters

pattern
String

the pattern for naming the output file

limit
Int32

the maximum number of bytes to write to any one file

count
Int32

the number of files to use

append
Boolean

specifies append mode

Attributes

Exceptions

if any I/O error occurs.

if pattern is empty, limit or count .

if pattern is null.

Remarks

Initialize a FileHandler to write to a set of files with optional append. When (approximately) the given limit has been written to one file, another file will be opened. The output will cycle through a set of count files.

The FileHandler is configured based on LogManager properties (or their default values) except that the given pattern argument is used as the filename pattern, the file limit is set to the limit argument, and the file count is set to the given count argument, and the append mode is set to the given append argument.

The count must be at least 1.

Java documentation for java.util.logging.FileHandler.FileHandler(java.lang.String, int, int, boolean).

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