class sun.nio.fs.MagicFileTypeDetector extends sun.nio.fs.AbstractFileTypeDetector
minor version: 0
major version: 59
flags: flags: (0x0020) ACC_SUPER
this_class: sun.nio.fs.MagicFileTypeDetector
super_class: sun.nio.fs.AbstractFileTypeDetector
{
private static final java.lang.String UNKNOW_MIME_TYPE;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "application/octet-stream"
private final boolean libmagicAvailable;
descriptor: Z
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: new sun.nio.fs.MagicFileTypeDetector$1
dup
invokespecial sun.nio.fs.MagicFileTypeDetector$1.<init>:()V
invokestatic java.security.AccessController.doPrivileged:(Ljava/security/PrivilegedAction;)Ljava/lang/Object;
pop
1: return
LocalVariableTable:
Start End Slot Name Signature
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
invokespecial sun.nio.fs.AbstractFileTypeDetector.<init>:()V
1: aload 0
invokestatic sun.nio.fs.MagicFileTypeDetector.initialize0:()Z
putfield sun.nio.fs.MagicFileTypeDetector.libmagicAvailable:Z
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lsun/nio/fs/MagicFileTypeDetector;
protected java.lang.String implProbeContentType(java.nio.file.Path);
descriptor: (Ljava/nio/file/Path;)Ljava/lang/String;
flags: (0x0004) ACC_PROTECTED
Code:
stack=3, locals=8, args_size=2
start local 0 start local 1 0: aload 0
getfield sun.nio.fs.MagicFileTypeDetector.libmagicAvailable:Z
ifeq 1
aload 1
instanceof sun.nio.fs.UnixPath
ifne 2
1: StackMap locals:
StackMap stack:
aconst_null
areturn
2: StackMap locals:
StackMap stack:
aload 1
checkcast sun.nio.fs.UnixPath
astore 2
start local 2 3: aload 2
invokevirtual sun.nio.fs.UnixPath.checkRead:()V
4: aload 2
invokevirtual sun.nio.fs.UnixPath.getByteArrayForSysCalls:()[B
invokestatic sun.nio.fs.NativeBuffers.asNativeBuffer:([B)Lsun/nio/fs/NativeBuffer;
astore 3
start local 3 5: aload 3
invokevirtual sun.nio.fs.NativeBuffer.address:()J
invokestatic sun.nio.fs.MagicFileTypeDetector.probe0:(J)[B
astore 4
start local 4 6: aload 4
ifnonnull 7
aconst_null
goto 8
StackMap locals: sun.nio.fs.UnixPath sun.nio.fs.NativeBuffer byte[]
StackMap stack:
7: new java.lang.String
dup
aload 4
invokespecial java.lang.String.<init>:([B)V
StackMap locals:
StackMap stack: java.lang.String
8: astore 5
start local 5 9: ldc "application/octet-stream"
aload 5
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 10
aconst_null
goto 11
StackMap locals: java.lang.String
StackMap stack:
10: aload 5
StackMap locals:
StackMap stack: java.lang.String
11: astore 7
12: aload 3
invokevirtual sun.nio.fs.NativeBuffer.release:()V
13: aload 7
areturn
end local 5 end local 4 14: StackMap locals: sun.nio.fs.MagicFileTypeDetector java.nio.file.Path sun.nio.fs.UnixPath sun.nio.fs.NativeBuffer
StackMap stack: java.lang.Throwable
astore 6
15: aload 3
invokevirtual sun.nio.fs.NativeBuffer.release:()V
16: aload 6
athrow
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 17 0 this Lsun/nio/fs/MagicFileTypeDetector;
0 17 1 obj Ljava/nio/file/Path;
3 17 2 path Lsun/nio/fs/UnixPath;
5 17 3 buffer Lsun/nio/fs/NativeBuffer;
6 14 4 type [B
9 14 5 mimeType Ljava/lang/String;
Exception table:
from to target type
5 12 14 any
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
obj
private static native boolean initialize0();
descriptor: ()Z
flags: (0x010a) ACC_PRIVATE, ACC_STATIC, ACC_NATIVE
private static native byte[] probe0(long);
descriptor: (J)[B
flags: (0x010a) ACC_PRIVATE, ACC_STATIC, ACC_NATIVE
MethodParameters:
Name Flags
pathAddress
}
SourceFile: "MagicFileTypeDetector.java"
NestMembers:
sun.nio.fs.MagicFileTypeDetector$1
InnerClasses:
sun.nio.fs.MagicFileTypeDetector$1