class sun.nio.fs.MimeTypesFileTypeDetector extends sun.nio.fs.AbstractFileTypeDetector
minor version: 0
major version: 59
flags: flags: (0x0020) ACC_SUPER
this_class: sun.nio.fs.MimeTypesFileTypeDetector
super_class: sun.nio.fs.AbstractFileTypeDetector
{
private final java.nio.file.Path mimeTypesFile;
descriptor: Ljava/nio/file/Path;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private java.util.Map<java.lang.String, java.lang.String> mimeTypeMap;
descriptor: Ljava/util/Map;
flags: (0x0002) ACC_PRIVATE
Signature: Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;
private volatile boolean loaded;
descriptor: Z
flags: (0x0042) ACC_PRIVATE, ACC_VOLATILE
public void <init>(java.nio.file.Path);
descriptor: (Ljava/nio/file/Path;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial sun.nio.fs.AbstractFileTypeDetector.<init>:()V
1: aload 0
aload 1
putfield sun.nio.fs.MimeTypesFileTypeDetector.mimeTypesFile:Ljava/nio/file/Path;
2: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lsun/nio/fs/MimeTypesFileTypeDetector;
0 3 1 filePath Ljava/nio/file/Path;
MethodParameters:
Name Flags
filePath
protected java.lang.String implProbeContentType(java.nio.file.Path);
descriptor: (Ljava/nio/file/Path;)Ljava/lang/String;
flags: (0x0004) ACC_PROTECTED
Code:
stack=2, locals=5, args_size=2
start local 0 start local 1 0: aload 1
invokeinterface java.nio.file.Path.getFileName:()Ljava/nio/file/Path;
astore 2
start local 2 1: aload 2
ifnonnull 3
2: aconst_null
areturn
3: StackMap locals: java.nio.file.Path
StackMap stack:
aload 0
aload 2
invokeinterface java.nio.file.Path.toString:()Ljava/lang/String;
invokevirtual sun.nio.fs.MimeTypesFileTypeDetector.getExtension:(Ljava/lang/String;)Ljava/lang/String;
astore 3
start local 3 4: aload 3
invokevirtual java.lang.String.isEmpty:()Z
ifeq 6
5: aconst_null
areturn
6: StackMap locals: java.lang.String
StackMap stack:
aload 0
invokevirtual sun.nio.fs.MimeTypesFileTypeDetector.loadMimeTypes:()V
7: aload 0
getfield sun.nio.fs.MimeTypesFileTypeDetector.mimeTypeMap:Ljava/util/Map;
ifnull 8
aload 0
getfield sun.nio.fs.MimeTypesFileTypeDetector.mimeTypeMap:Ljava/util/Map;
invokeinterface java.util.Map.isEmpty:()Z
ifeq 9
8: StackMap locals:
StackMap stack:
aconst_null
areturn
9: StackMap locals:
StackMap stack:
aload 0
getfield sun.nio.fs.MimeTypesFileTypeDetector.mimeTypeMap:Ljava/util/Map;
aload 3
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.lang.String
astore 4
start local 4 10: aload 4
ifnonnull 12
11: aload 0
aload 3
invokevirtual sun.nio.fs.MimeTypesFileTypeDetector.getExtension:(Ljava/lang/String;)Ljava/lang/String;
astore 3
12: StackMap locals: java.lang.String
StackMap stack:
aload 4
ifnonnull 13
aload 3
invokevirtual java.lang.String.isEmpty:()Z
ifeq 9
13: StackMap locals:
StackMap stack:
aload 4
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 14 0 this Lsun/nio/fs/MimeTypesFileTypeDetector;
0 14 1 path Ljava/nio/file/Path;
1 14 2 fn Ljava/nio/file/Path;
4 14 3 ext Ljava/lang/String;
10 14 4 mimeType Ljava/lang/String;
MethodParameters:
Name Flags
path
private void loadMimeTypes();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=6, args_size=1
start local 0 0: aload 0
getfield sun.nio.fs.MimeTypesFileTypeDetector.loaded:Z
ifne 23
1: aload 0
dup
astore 1
monitorenter
2: aload 0
getfield sun.nio.fs.MimeTypesFileTypeDetector.loaded:Z
ifne 19
3: new sun.nio.fs.MimeTypesFileTypeDetector$1
dup
aload 0
invokespecial sun.nio.fs.MimeTypesFileTypeDetector$1.<init>:(Lsun/nio/fs/MimeTypesFileTypeDetector;)V
4: invokestatic java.security.AccessController.doPrivileged:(Ljava/security/PrivilegedAction;)Ljava/lang/Object;
checkcast java.util.List
astore 2
start local 2 5: aload 0
new java.util.HashMap
dup
aload 2
invokeinterface java.util.List.size:()I
invokespecial java.util.HashMap.<init>:(I)V
putfield sun.nio.fs.MimeTypesFileTypeDetector.mimeTypeMap:Ljava/util/Map;
6: ldc ""
astore 3
start local 3 7: aload 2
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 5
goto 15
StackMap locals: sun.nio.fs.MimeTypesFileTypeDetector sun.nio.fs.MimeTypesFileTypeDetector java.util.List java.lang.String top java.util.Iterator
StackMap stack:
8: aload 5
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.lang.String
astore 4
start local 4 9: new java.lang.StringBuilder
dup
aload 3
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 4
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
astore 3
10: aload 3
ldc "\\"
invokevirtual java.lang.String.endsWith:(Ljava/lang/String;)Z
ifeq 13
11: aload 3
iconst_0
aload 3
invokevirtual java.lang.String.length:()I
iconst_1
isub
invokevirtual java.lang.String.substring:(II)Ljava/lang/String;
astore 3
12: goto 15
13: StackMap locals: sun.nio.fs.MimeTypesFileTypeDetector sun.nio.fs.MimeTypesFileTypeDetector java.util.List java.lang.String java.lang.String java.util.Iterator
StackMap stack:
aload 0
aload 3
invokevirtual sun.nio.fs.MimeTypesFileTypeDetector.parseMimeEntry:(Ljava/lang/String;)V
14: ldc ""
astore 3
end local 4 15: StackMap locals: sun.nio.fs.MimeTypesFileTypeDetector sun.nio.fs.MimeTypesFileTypeDetector java.util.List java.lang.String top java.util.Iterator
StackMap stack:
aload 5
invokeinterface java.util.Iterator.hasNext:()Z
ifne 8
16: aload 3
invokevirtual java.lang.String.isEmpty:()Z
ifne 18
17: aload 0
aload 3
invokevirtual sun.nio.fs.MimeTypesFileTypeDetector.parseMimeEntry:(Ljava/lang/String;)V
18: StackMap locals: sun.nio.fs.MimeTypesFileTypeDetector sun.nio.fs.MimeTypesFileTypeDetector java.util.List java.lang.String
StackMap stack:
aload 0
iconst_1
putfield sun.nio.fs.MimeTypesFileTypeDetector.loaded:Z
end local 3 end local 2 19: StackMap locals:
StackMap stack:
aload 1
monitorexit
20: goto 23
StackMap locals:
StackMap stack: java.lang.Throwable
21: aload 1
monitorexit
22: athrow
23: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 24 0 this Lsun/nio/fs/MimeTypesFileTypeDetector;
5 19 2 lines Ljava/util/List<Ljava/lang/String;>;
7 19 3 entry Ljava/lang/String;
9 15 4 line Ljava/lang/String;
Exception table:
from to target type
2 20 21 any
21 22 21 any
private void parseMimeEntry(java.lang.String);
descriptor: (Ljava/lang/String;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=16, args_size=2
start local 0 start local 1 0: aload 1
invokevirtual java.lang.String.trim:()Ljava/lang/String;
astore 1
1: aload 1
invokevirtual java.lang.String.isEmpty:()Z
ifne 2
aload 1
iconst_0
invokevirtual java.lang.String.charAt:(I)C
bipush 35
if_icmpne 3
2: StackMap locals:
StackMap stack:
return
3: StackMap locals:
StackMap stack:
aload 1
ldc "\\s*#.*"
ldc ""
invokevirtual java.lang.String.replaceAll:(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
astore 1
4: aload 1
bipush 61
invokevirtual java.lang.String.indexOf:(I)I
istore 2
start local 2 5: iload 2
ifle 28
6: ldc "\\btype=(\"\\p{Graph}+?/\\p{Graph}+?\"|\\p{Graph}+/\\p{Graph}+\\b)"
astore 3
start local 3 7: aload 3
invokestatic java.util.regex.Pattern.compile:(Ljava/lang/String;)Ljava/util/regex/Pattern;
astore 4
start local 4 8: aload 4
aload 1
invokevirtual java.util.regex.Pattern.matcher:(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
astore 5
start local 5 9: aload 5
invokevirtual java.util.regex.Matcher.find:()Z
ifeq 33
10: aload 5
invokevirtual java.util.regex.Matcher.group:()Ljava/lang/String;
ldc "type="
invokevirtual java.lang.String.length:()I
invokevirtual java.lang.String.substring:(I)Ljava/lang/String;
astore 6
start local 6 11: aload 6
iconst_0
invokevirtual java.lang.String.charAt:(I)C
bipush 34
if_icmpne 13
12: aload 6
iconst_1
aload 6
invokevirtual java.lang.String.length:()I
iconst_1
isub
invokevirtual java.lang.String.substring:(II)Ljava/lang/String;
astore 6
13: StackMap locals: sun.nio.fs.MimeTypesFileTypeDetector java.lang.String int java.lang.String java.util.regex.Pattern java.util.regex.Matcher java.lang.String
StackMap stack:
ldc "\\bexts=(\"[\\p{Graph}\\p{Blank}]+?\"|\\p{Graph}+\\b)"
astore 7
start local 7 14: aload 7
invokestatic java.util.regex.Pattern.compile:(Ljava/lang/String;)Ljava/util/regex/Pattern;
astore 8
start local 8 15: aload 8
aload 1
invokevirtual java.util.regex.Pattern.matcher:(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
astore 9
start local 9 16: aload 9
invokevirtual java.util.regex.Matcher.find:()Z
ifeq 33
17: aload 9
invokevirtual java.util.regex.Matcher.group:()Ljava/lang/String;
ldc "exts="
invokevirtual java.lang.String.length:()I
invokevirtual java.lang.String.substring:(I)Ljava/lang/String;
18: astore 10
start local 10 19: aload 10
iconst_0
invokevirtual java.lang.String.charAt:(I)C
bipush 34
if_icmpne 21
20: aload 10
iconst_1
aload 10
invokevirtual java.lang.String.length:()I
iconst_1
isub
invokevirtual java.lang.String.substring:(II)Ljava/lang/String;
astore 10
21: StackMap locals: sun.nio.fs.MimeTypesFileTypeDetector java.lang.String int java.lang.String java.util.regex.Pattern java.util.regex.Matcher java.lang.String java.lang.String java.util.regex.Pattern java.util.regex.Matcher java.lang.String
StackMap stack:
aload 10
ldc "[\\p{Blank}\\p{Punct}]+"
invokevirtual java.lang.String.split:(Ljava/lang/String;)[Ljava/lang/String;
astore 11
start local 11 22: aload 11
dup
astore 15
arraylength
istore 14
iconst_0
istore 13
goto 26
StackMap locals: sun.nio.fs.MimeTypesFileTypeDetector java.lang.String int java.lang.String java.util.regex.Pattern java.util.regex.Matcher java.lang.String java.lang.String java.util.regex.Pattern java.util.regex.Matcher java.lang.String java.lang.String[] top int int java.lang.String[]
StackMap stack:
23: aload 15
iload 13
aaload
astore 12
start local 12 24: aload 0
aload 12
aload 6
invokevirtual sun.nio.fs.MimeTypesFileTypeDetector.putIfAbsent:(Ljava/lang/String;Ljava/lang/String;)V
end local 12 25: iinc 13 1
StackMap locals:
StackMap stack:
26: iload 13
iload 14
if_icmplt 23
end local 11 end local 10 end local 9 end local 8 end local 7 end local 6 end local 5 end local 4 end local 3 27: goto 33
28: StackMap locals: sun.nio.fs.MimeTypesFileTypeDetector java.lang.String int
StackMap stack:
aload 1
ldc "\\s+"
invokevirtual java.lang.String.split:(Ljava/lang/String;)[Ljava/lang/String;
astore 3
start local 3 29: iconst_1
istore 4
start local 4 30: goto 32
31: StackMap locals: java.lang.String[] int
StackMap stack:
aload 0
aload 3
iload 4
iinc 4 1
aaload
aload 3
iconst_0
aaload
invokevirtual sun.nio.fs.MimeTypesFileTypeDetector.putIfAbsent:(Ljava/lang/String;Ljava/lang/String;)V
32: StackMap locals:
StackMap stack:
iload 4
aload 3
arraylength
if_icmplt 31
end local 4 end local 3 33: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 34 0 this Lsun/nio/fs/MimeTypesFileTypeDetector;
0 34 1 entry Ljava/lang/String;
5 34 2 equalIdx I
7 27 3 typeRegex Ljava/lang/String;
8 27 4 typePattern Ljava/util/regex/Pattern;
9 27 5 typeMatcher Ljava/util/regex/Matcher;
11 27 6 type Ljava/lang/String;
14 27 7 extRegex Ljava/lang/String;
15 27 8 extPattern Ljava/util/regex/Pattern;
16 27 9 extMatcher Ljava/util/regex/Matcher;
19 27 10 exts Ljava/lang/String;
22 27 11 extList [Ljava/lang/String;
24 25 12 ext Ljava/lang/String;
29 33 3 elements [Ljava/lang/String;
30 33 4 i I
MethodParameters:
Name Flags
entry
private void putIfAbsent(java.lang.String, java.lang.String);
descriptor: (Ljava/lang/String;Ljava/lang/String;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 1
ifnull 4
aload 1
invokevirtual java.lang.String.isEmpty:()Z
ifne 4
1: aload 2
ifnull 4
aload 2
invokevirtual java.lang.String.isEmpty:()Z
ifne 4
2: aload 0
getfield sun.nio.fs.MimeTypesFileTypeDetector.mimeTypeMap:Ljava/util/Map;
aload 1
invokeinterface java.util.Map.containsKey:(Ljava/lang/Object;)Z
ifne 4
3: aload 0
getfield sun.nio.fs.MimeTypesFileTypeDetector.mimeTypeMap:Ljava/util/Map;
aload 1
aload 2
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
4: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lsun/nio/fs/MimeTypesFileTypeDetector;
0 5 1 key Ljava/lang/String;
0 5 2 value Ljava/lang/String;
MethodParameters:
Name Flags
key
value
}
SourceFile: "MimeTypesFileTypeDetector.java"
NestMembers:
sun.nio.fs.MimeTypesFileTypeDetector$1
InnerClasses:
sun.nio.fs.MimeTypesFileTypeDetector$1