public class org.glassfish.grizzly.http.server.StaticHttpHandler extends org.glassfish.grizzly.http.server.StaticHttpHandlerBase
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.glassfish.grizzly.http.server.StaticHttpHandler
super_class: org.glassfish.grizzly.http.server.StaticHttpHandlerBase
{
private static final java.util.logging.Logger LOGGER;
descriptor: Ljava/util/logging/Logger;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
protected final org.glassfish.grizzly.utils.ArraySet<java.io.File> docRoots;
descriptor: Lorg/glassfish/grizzly/utils/ArraySet;
flags: (0x0014) ACC_PROTECTED, ACC_FINAL
Signature: Lorg/glassfish/grizzly/utils/ArraySet<Ljava/io/File;>;
private boolean directorySlashOff;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
static final boolean $assertionsDisabled;
descriptor: Z
flags: (0x1018) ACC_STATIC, ACC_FINAL, ACC_SYNTHETIC
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: ldc Lorg/glassfish/grizzly/http/server/StaticHttpHandler;
invokevirtual java.lang.Class.desiredAssertionStatus:()Z
ifne 1
iconst_1
goto 2
StackMap locals:
StackMap stack:
1: iconst_0
StackMap locals:
StackMap stack: int
2: putstatic org.glassfish.grizzly.http.server.StaticHttpHandler.$assertionsDisabled:Z
3: ldc Lorg/glassfish/grizzly/http/server/StaticHttpHandler;
invokestatic org.glassfish.grizzly.Grizzly.logger:(Ljava/lang/Class;)Ljava/util/logging/Logger;
putstatic org.glassfish.grizzly.http.server.StaticHttpHandler.LOGGER:Ljava/util/logging/Logger;
return
LocalVariableTable:
Start End Slot Name Signature
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=1, args_size=1
start local 0 0: aload 0
invokespecial org.glassfish.grizzly.http.server.StaticHttpHandlerBase.<init>:()V
1: aload 0
new org.glassfish.grizzly.utils.ArraySet
dup
ldc Ljava/io/File;
invokespecial org.glassfish.grizzly.utils.ArraySet.<init>:(Ljava/lang/Class;)V
putfield org.glassfish.grizzly.http.server.StaticHttpHandler.docRoots:Lorg/glassfish/grizzly/utils/ArraySet;
2: aload 0
ldc "."
invokevirtual org.glassfish.grizzly.http.server.StaticHttpHandler.addDocRoot:(Ljava/lang/String;)Ljava/io/File;
pop
3: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/glassfish/grizzly/http/server/StaticHttpHandler;
public void <init>(java.lang.String[]);
descriptor: ([Ljava/lang/String;)V
flags: (0x0081) ACC_PUBLIC, ACC_VARARGS
Code:
stack=4, locals=6, args_size=2
start local 0 start local 1 0: aload 0
invokespecial org.glassfish.grizzly.http.server.StaticHttpHandlerBase.<init>:()V
1: aload 0
new org.glassfish.grizzly.utils.ArraySet
dup
ldc Ljava/io/File;
invokespecial org.glassfish.grizzly.utils.ArraySet.<init>:(Ljava/lang/Class;)V
putfield org.glassfish.grizzly.http.server.StaticHttpHandler.docRoots:Lorg/glassfish/grizzly/utils/ArraySet;
2: aload 1
ifnull 8
3: aload 1
dup
astore 5
arraylength
istore 4
iconst_0
istore 3
goto 7
StackMap locals: org.glassfish.grizzly.http.server.StaticHttpHandler java.lang.String[] top int int java.lang.String[]
StackMap stack:
4: aload 5
iload 3
aaload
astore 2
start local 2 5: aload 0
aload 2
invokevirtual org.glassfish.grizzly.http.server.StaticHttpHandler.addDocRoot:(Ljava/lang/String;)Ljava/io/File;
pop
end local 2 6: iinc 3 1
StackMap locals:
StackMap stack:
7: iload 3
iload 4
if_icmplt 4
8: StackMap locals: org.glassfish.grizzly.http.server.StaticHttpHandler java.lang.String[]
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lorg/glassfish/grizzly/http/server/StaticHttpHandler;
0 9 1 docRoots [Ljava/lang/String;
5 6 2 docRoot Ljava/lang/String;
MethodParameters:
Name Flags
docRoots
public void <init>(java.util.Set<java.lang.String>);
descriptor: (Ljava/util/Set;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=4, args_size=2
start local 0 start local 1 0: aload 0
invokespecial org.glassfish.grizzly.http.server.StaticHttpHandlerBase.<init>:()V
1: aload 0
new org.glassfish.grizzly.utils.ArraySet
dup
ldc Ljava/io/File;
invokespecial org.glassfish.grizzly.utils.ArraySet.<init>:(Ljava/lang/Class;)V
putfield org.glassfish.grizzly.http.server.StaticHttpHandler.docRoots:Lorg/glassfish/grizzly/utils/ArraySet;
2: aload 1
ifnull 7
3: aload 1
invokeinterface java.util.Set.iterator:()Ljava/util/Iterator;
astore 3
goto 6
StackMap locals: org.glassfish.grizzly.http.server.StaticHttpHandler java.util.Set top java.util.Iterator
StackMap stack:
4: aload 3
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.lang.String
astore 2
start local 2 5: aload 0
aload 2
invokevirtual org.glassfish.grizzly.http.server.StaticHttpHandler.addDocRoot:(Ljava/lang/String;)Ljava/io/File;
pop
end local 2 6: StackMap locals:
StackMap stack:
aload 3
invokeinterface java.util.Iterator.hasNext:()Z
ifne 4
7: StackMap locals: org.glassfish.grizzly.http.server.StaticHttpHandler java.util.Set
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lorg/glassfish/grizzly/http/server/StaticHttpHandler;
0 8 1 docRoots Ljava/util/Set<Ljava/lang/String;>;
5 6 2 docRoot Ljava/lang/String;
Signature: (Ljava/util/Set<Ljava/lang/String;>;)V
MethodParameters:
Name Flags
docRoots
public java.io.File getDefaultDocRoot();
descriptor: ()Ljava/io/File;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=1
start local 0 0: aload 0
getfield org.glassfish.grizzly.http.server.StaticHttpHandler.docRoots:Lorg/glassfish/grizzly/utils/ArraySet;
invokevirtual org.glassfish.grizzly.utils.ArraySet.getArray:()[Ljava/lang/Object;
checkcast java.io.File[]
astore 1
start local 1 1: aload 1
ifnull 2
aload 1
arraylength
ifle 2
aload 1
iconst_0
aaload
goto 3
StackMap locals: java.io.File[]
StackMap stack:
2: aconst_null
StackMap locals:
StackMap stack: java.io.File
3: areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/glassfish/grizzly/http/server/StaticHttpHandler;
1 4 1 array [Ljava/io/File;
public org.glassfish.grizzly.utils.ArraySet<java.io.File> getDocRoots();
descriptor: ()Lorg/glassfish/grizzly/utils/ArraySet;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.glassfish.grizzly.http.server.StaticHttpHandler.docRoots:Lorg/glassfish/grizzly/utils/ArraySet;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/glassfish/grizzly/http/server/StaticHttpHandler;
Signature: ()Lorg/glassfish/grizzly/utils/ArraySet<Ljava/io/File;>;
public final java.io.File addDocRoot(java.lang.String);
descriptor: (Ljava/lang/String;)Ljava/io/File;
flags: (0x0011) ACC_PUBLIC, ACC_FINAL
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: aload 1
ifnonnull 2
1: new java.lang.NullPointerException
dup
ldc "docRoot can't be null"
invokespecial java.lang.NullPointerException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
new java.io.File
dup
aload 1
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
astore 2
start local 2 3: aload 0
aload 2
invokevirtual org.glassfish.grizzly.http.server.StaticHttpHandler.addDocRoot:(Ljava/io/File;)V
4: aload 2
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/glassfish/grizzly/http/server/StaticHttpHandler;
0 5 1 docRoot Ljava/lang/String;
3 5 2 file Ljava/io/File;
MethodParameters:
Name Flags
docRoot
public final void addDocRoot(java.io.File);
descriptor: (Ljava/io/File;)V
flags: (0x0011) ACC_PUBLIC, ACC_FINAL
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield org.glassfish.grizzly.http.server.StaticHttpHandler.docRoots:Lorg/glassfish/grizzly/utils/ArraySet;
aload 1
invokevirtual org.glassfish.grizzly.utils.ArraySet.add:(Ljava/lang/Object;)Z
pop
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/glassfish/grizzly/http/server/StaticHttpHandler;
0 2 1 docRoot Ljava/io/File;
MethodParameters:
Name Flags
docRoot
public void removeDocRoot(java.io.File);
descriptor: (Ljava/io/File;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield org.glassfish.grizzly.http.server.StaticHttpHandler.docRoots:Lorg/glassfish/grizzly/utils/ArraySet;
aload 1
invokevirtual org.glassfish.grizzly.utils.ArraySet.remove:(Ljava/lang/Object;)Z
pop
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/glassfish/grizzly/http/server/StaticHttpHandler;
0 2 1 docRoot Ljava/io/File;
MethodParameters:
Name Flags
docRoot
public boolean isDirectorySlashOff();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.glassfish.grizzly.http.server.StaticHttpHandler.directorySlashOff:Z
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/glassfish/grizzly/http/server/StaticHttpHandler;
public void setDirectorySlashOff(boolean);
descriptor: (Z)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
iload 1
putfield org.glassfish.grizzly.http.server.StaticHttpHandler.directorySlashOff:Z
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/glassfish/grizzly/http/server/StaticHttpHandler;
0 2 1 directorySlashOff Z
MethodParameters:
Name Flags
directorySlashOff
protected boolean handle(java.lang.String, org.glassfish.grizzly.http.server.Request, org.glassfish.grizzly.http.server.Response);
descriptor: (Ljava/lang/String;Lorg/glassfish/grizzly/http/server/Request;Lorg/glassfish/grizzly/http/server/Response;)Z
flags: (0x0004) ACC_PROTECTED
Code:
stack=7, locals=12, args_size=4
start local 0 start local 1 start local 2 start local 3 0: iconst_0
istore 4
start local 4 1: aload 0
getfield org.glassfish.grizzly.http.server.StaticHttpHandler.docRoots:Lorg/glassfish/grizzly/utils/ArraySet;
invokevirtual org.glassfish.grizzly.utils.ArraySet.getArray:()[Ljava/lang/Object;
checkcast java.io.File[]
astore 5
start local 5 2: aload 5
ifnonnull 4
3: iconst_0
ireturn
4: StackMap locals: int java.io.File[]
StackMap stack:
aconst_null
astore 6
start local 6 5: iconst_0
istore 7
start local 7 6: goto 27
7: StackMap locals: java.io.File int
StackMap stack:
aload 5
iload 7
aaload
astore 8
start local 8 8: new java.io.File
dup
aload 8
aload 1
invokespecial java.io.File.<init>:(Ljava/io/File;Ljava/lang/String;)V
astore 6
9: aload 6
invokevirtual java.io.File.exists:()Z
istore 9
start local 9 10: aload 6
invokevirtual java.io.File.isDirectory:()Z
istore 10
start local 10 11: iload 9
ifeq 21
iload 10
ifeq 21
12: aload 0
getfield org.glassfish.grizzly.http.server.StaticHttpHandler.directorySlashOff:Z
ifne 16
aload 1
ldc "/"
invokevirtual java.lang.String.endsWith:(Ljava/lang/String;)Z
ifne 16
13: aload 3
getstatic org.glassfish.grizzly.http.util.HttpStatus.MOVED_PERMANENTLY_301:Lorg/glassfish/grizzly/http/util/HttpStatus;
invokevirtual org.glassfish.grizzly.http.server.Response.setStatus:(Lorg/glassfish/grizzly/http/util/HttpStatus;)V
14: aload 3
getstatic org.glassfish.grizzly.http.util.Header.Location:Lorg/glassfish/grizzly/http/util/Header;
aload 3
new java.lang.StringBuilder
dup
aload 1
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc "/"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual org.glassfish.grizzly.http.server.Response.encodeRedirectURL:(Ljava/lang/String;)Ljava/lang/String;
invokevirtual org.glassfish.grizzly.http.server.Response.setHeader:(Lorg/glassfish/grizzly/http/util/Header;Ljava/lang/String;)V
15: iconst_1
ireturn
16: StackMap locals: java.io.File int int
StackMap stack:
new java.io.File
dup
aload 6
ldc "/index.html"
invokespecial java.io.File.<init>:(Ljava/io/File;Ljava/lang/String;)V
astore 11
start local 11 17: aload 11
invokevirtual java.io.File.exists:()Z
ifeq 21
18: aload 11
astore 6
19: iconst_1
istore 4
20: goto 28
end local 11 21: StackMap locals:
StackMap stack:
iload 10
ifne 22
iload 9
ifne 24
22: StackMap locals:
StackMap stack:
iconst_0
istore 4
23: goto 26
24: StackMap locals:
StackMap stack:
iconst_1
istore 4
25: goto 28
end local 10 end local 9 end local 8 26: StackMap locals:
StackMap stack:
iinc 7 1
StackMap locals:
StackMap stack:
27: iload 7
aload 5
arraylength
if_icmplt 7
end local 7 28: StackMap locals:
StackMap stack:
iload 4
ifne 32
29: getstatic org.glassfish.grizzly.http.server.StaticHttpHandler.LOGGER:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINE:Ljava/util/logging/Level;
invokevirtual java.util.logging.Logger.isLoggable:(Ljava/util/logging/Level;)Z
ifeq 31
30: getstatic org.glassfish.grizzly.http.server.StaticHttpHandler.LOGGER:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINE:Ljava/util/logging/Level;
ldc "File not found {0}"
aload 6
invokevirtual java.util.logging.Logger.log:(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Object;)V
31: StackMap locals:
StackMap stack:
iconst_0
ireturn
32: StackMap locals:
StackMap stack:
getstatic org.glassfish.grizzly.http.server.StaticHttpHandler.$assertionsDisabled:Z
ifne 33
aload 6
ifnonnull 33
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
33: StackMap locals:
StackMap stack:
getstatic org.glassfish.grizzly.http.Method.GET:Lorg/glassfish/grizzly/http/Method;
aload 2
invokevirtual org.glassfish.grizzly.http.server.Request.getMethod:()Lorg/glassfish/grizzly/http/Method;
invokevirtual java.lang.Object.equals:(Ljava/lang/Object;)Z
ifne 39
34: getstatic org.glassfish.grizzly.http.server.StaticHttpHandler.LOGGER:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINE:Ljava/util/logging/Level;
invokevirtual java.util.logging.Logger.isLoggable:(Ljava/util/logging/Level;)Z
ifeq 36
35: getstatic org.glassfish.grizzly.http.server.StaticHttpHandler.LOGGER:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINE:Ljava/util/logging/Level;
ldc "File found {0}, but HTTP method {1} is not allowed"
iconst_2
anewarray java.lang.Object
dup
iconst_0
aload 6
aastore
dup
iconst_1
aload 2
invokevirtual org.glassfish.grizzly.http.server.Request.getMethod:()Lorg/glassfish/grizzly/http/Method;
aastore
invokevirtual java.util.logging.Logger.log:(Ljava/util/logging/Level;Ljava/lang/String;[Ljava/lang/Object;)V
36: StackMap locals:
StackMap stack:
aload 3
getstatic org.glassfish.grizzly.http.util.HttpStatus.METHOD_NOT_ALLOWED_405:Lorg/glassfish/grizzly/http/util/HttpStatus;
invokevirtual org.glassfish.grizzly.http.server.Response.setStatus:(Lorg/glassfish/grizzly/http/util/HttpStatus;)V
37: aload 3
getstatic org.glassfish.grizzly.http.util.Header.Allow:Lorg/glassfish/grizzly/http/util/Header;
ldc "GET"
invokevirtual org.glassfish.grizzly.http.server.Response.setHeader:(Lorg/glassfish/grizzly/http/util/Header;Ljava/lang/String;)V
38: iconst_1
ireturn
39: StackMap locals:
StackMap stack:
aload 3
aload 6
invokevirtual java.io.File.getPath:()Ljava/lang/String;
invokestatic org.glassfish.grizzly.http.server.StaticHttpHandler.pickupContentType:(Lorg/glassfish/grizzly/http/server/Response;Ljava/lang/String;)V
40: aload 0
aload 2
aload 3
aload 6
invokevirtual org.glassfish.grizzly.http.server.StaticHttpHandler.addToFileCache:(Lorg/glassfish/grizzly/http/server/Request;Lorg/glassfish/grizzly/http/server/Response;Ljava/io/File;)Z
pop
41: aload 3
aload 6
invokestatic org.glassfish.grizzly.http.server.StaticHttpHandler.sendFile:(Lorg/glassfish/grizzly/http/server/Response;Ljava/io/File;)V
42: iconst_1
ireturn
end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 43 0 this Lorg/glassfish/grizzly/http/server/StaticHttpHandler;
0 43 1 uri Ljava/lang/String;
0 43 2 request Lorg/glassfish/grizzly/http/server/Request;
0 43 3 response Lorg/glassfish/grizzly/http/server/Response;
1 43 4 found Z
2 43 5 fileFolders [Ljava/io/File;
5 43 6 resource Ljava/io/File;
6 28 7 i I
8 26 8 webDir Ljava/io/File;
10 26 9 exists Z
11 26 10 isDirectory Z
17 21 11 f Ljava/io/File;
Exceptions:
throws java.lang.Exception
MethodParameters:
Name Flags
uri final
request final
response final
}
SourceFile: "StaticHttpHandler.java"