JarFile Constructors

Definition

Overloads

JarFile(File)

Creates a new JarFile to read from the specified File object.

JarFile(String)

Creates a new JarFile to read from the specified file name.

JarFile(File, Boolean)

Creates a new JarFile to read from the specified File object.

JarFile(IntPtr, JniHandleOwnership)

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

JarFile(String, Boolean)

Creates a new JarFile to read from the specified file name.

JarFile(File, Boolean, Int32)

Creates a new JarFile to read from the specified File object in the specified mode.

JarFile(File)

Creates a new JarFile to read from the specified File object.

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

Parameters

file
File

the jar file to be opened for reading

Attributes

Exceptions

If the file cannot be read.

Remarks

Creates a new JarFile to read from the specified File object. The JarFile will be verified if it is signed.

Java documentation for java.util.jar.JarFile.JarFile(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

JarFile(String)

Creates a new JarFile to read from the specified file name.

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

Parameters

name
String

the name of the jar file to be opened for reading

Attributes

Exceptions

if file name cannot be opened for reading.

Remarks

Creates a new JarFile to read from the specified file name. The JarFile will be verified if it is signed.

Java documentation for java.util.jar.JarFile.JarFile(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

JarFile(File, Boolean)

Creates a new JarFile to read from the specified File object.

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

Parameters

file
File

the jar file to be opened for reading

verify
Boolean

whether or not to verify the jar file if it is signed.

Attributes

Exceptions

If the file cannot be read.

Remarks

Creates a new JarFile to read from the specified File object.

Java documentation for java.util.jar.JarFile.JarFile(java.io.File, 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

JarFile(IntPtr, JniHandleOwnership)

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

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

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

JarFile(String, Boolean)

Creates a new JarFile to read from the specified file name.

[Android.Runtime.Register(".ctor", "(Ljava/lang/String;Z)V", "")]
public JarFile (string? name, bool verify);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;Z)V", "")>]
new Java.Util.Jar.JarFile : string * bool -> Java.Util.Jar.JarFile

Parameters

name
String

the name of the jar file to be opened for reading

verify
Boolean

whether or not to verify the jar file if it is signed.

Attributes

Exceptions

If file cannot be opened or read.

Remarks

Creates a new JarFile to read from the specified file name.

Java documentation for java.util.jar.JarFile.JarFile(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

JarFile(File, Boolean, Int32)

Creates a new JarFile to read from the specified File object in the specified mode.

[Android.Runtime.Register(".ctor", "(Ljava/io/File;ZI)V", "")]
public JarFile (Java.IO.File? file, bool verify, int mode);
[<Android.Runtime.Register(".ctor", "(Ljava/io/File;ZI)V", "")>]
new Java.Util.Jar.JarFile : Java.IO.File * bool * int -> Java.Util.Jar.JarFile

Parameters

file
File

the jar file to be opened for reading

verify
Boolean

whether or not to verify the jar file if it is signed.

mode
Int32

the mode in which the file is to be opened

Attributes

Exceptions

If the file cannot be read.

Remarks

Creates a new JarFile to read from the specified File object in the specified mode. The mode argument must be either OPEN_READ or OPEN_READ | OPEN_DELETE.

Added in 1.3.

Java documentation for java.util.jar.JarFile.JarFile(java.io.File, boolean, 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