public class io.dropwizard.servlets.assets.AssetServlet extends javax.servlet.http.HttpServlet
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: io.dropwizard.servlets.assets.AssetServlet
super_class: javax.servlet.http.HttpServlet
{
private static final long serialVersionUID;
descriptor: J
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 6393345594784987908
private static final com.google.common.base.CharMatcher SLASHES;
descriptor: Lcom/google/common/base/CharMatcher;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final com.google.common.net.MediaType DEFAULT_MEDIA_TYPE;
descriptor: Lcom/google/common/net/MediaType;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private final java.lang.String resourcePath;
descriptor: Ljava/lang/String;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.lang.String uriPath;
descriptor: Ljava/lang/String;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.lang.String indexFile;
descriptor: Ljava/lang/String;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
RuntimeVisibleAnnotations:
javax.annotation.Nullable()
private final java.nio.charset.Charset defaultCharset;
descriptor: Ljava/nio/charset/Charset;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
RuntimeVisibleAnnotations:
javax.annotation.Nullable()
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: bipush 47
invokestatic com.google.common.base.CharMatcher.is:(C)Lcom/google/common/base/CharMatcher;
putstatic io.dropwizard.servlets.assets.AssetServlet.SLASHES:Lcom/google/common/base/CharMatcher;
1: getstatic com.google.common.net.MediaType.HTML_UTF_8:Lcom/google/common/net/MediaType;
putstatic io.dropwizard.servlets.assets.AssetServlet.DEFAULT_MEDIA_TYPE:Lcom/google/common/net/MediaType;
return
LocalVariableTable:
Start End Slot Name Signature
public void <init>(java.lang.String, java.lang.String, java.lang.String, java.nio.charset.Charset);
descriptor: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/nio/charset/Charset;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=7, args_size=5
start local 0 start local 1 start local 2 start local 3 start local 4 0: aload 0
invokespecial javax.servlet.http.HttpServlet.<init>:()V
1: getstatic io.dropwizard.servlets.assets.AssetServlet.SLASHES:Lcom/google/common/base/CharMatcher;
aload 1
invokevirtual com.google.common.base.CharMatcher.trimFrom:(Ljava/lang/CharSequence;)Ljava/lang/String;
astore 5
start local 5 2: aload 0
aload 5
invokevirtual java.lang.String.isEmpty:()Z
ifeq 3
aload 5
goto 4
StackMap locals: io.dropwizard.servlets.assets.AssetServlet java.lang.String java.lang.String java.lang.String java.nio.charset.Charset java.lang.String
StackMap stack: io.dropwizard.servlets.assets.AssetServlet
3: new java.lang.StringBuilder
dup
aload 5
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
bipush 47
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
StackMap locals: io.dropwizard.servlets.assets.AssetServlet java.lang.String java.lang.String java.lang.String java.nio.charset.Charset java.lang.String
StackMap stack: io.dropwizard.servlets.assets.AssetServlet java.lang.String
4: putfield io.dropwizard.servlets.assets.AssetServlet.resourcePath:Ljava/lang/String;
5: getstatic io.dropwizard.servlets.assets.AssetServlet.SLASHES:Lcom/google/common/base/CharMatcher;
aload 2
invokevirtual com.google.common.base.CharMatcher.trimTrailingFrom:(Ljava/lang/CharSequence;)Ljava/lang/String;
astore 6
start local 6 6: aload 0
aload 6
invokevirtual java.lang.String.isEmpty:()Z
ifeq 7
ldc "/"
goto 8
StackMap locals: io.dropwizard.servlets.assets.AssetServlet java.lang.String java.lang.String java.lang.String java.nio.charset.Charset java.lang.String java.lang.String
StackMap stack: io.dropwizard.servlets.assets.AssetServlet
7: aload 6
StackMap locals: io.dropwizard.servlets.assets.AssetServlet java.lang.String java.lang.String java.lang.String java.nio.charset.Charset java.lang.String java.lang.String
StackMap stack: io.dropwizard.servlets.assets.AssetServlet java.lang.String
8: putfield io.dropwizard.servlets.assets.AssetServlet.uriPath:Ljava/lang/String;
9: aload 0
aload 3
putfield io.dropwizard.servlets.assets.AssetServlet.indexFile:Ljava/lang/String;
10: aload 0
aload 4
putfield io.dropwizard.servlets.assets.AssetServlet.defaultCharset:Ljava/nio/charset/Charset;
11: return
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 12 0 this Lio/dropwizard/servlets/assets/AssetServlet;
0 12 1 resourcePath Ljava/lang/String;
0 12 2 uriPath Ljava/lang/String;
0 12 3 indexFile Ljava/lang/String;
0 12 4 defaultCharset Ljava/nio/charset/Charset;
2 12 5 trimmedPath Ljava/lang/String;
6 12 6 trimmedUri Ljava/lang/String;
RuntimeVisibleTypeAnnotations:
METHOD_FORMAL_PARAMETER
javax.annotation.Nullable()
METHOD_FORMAL_PARAMETER
javax.annotation.Nullable()
RuntimeVisibleParameterAnnotations:
0:
1:
2:
javax.annotation.Nullable()
3:
javax.annotation.Nullable()
MethodParameters:
Name Flags
resourcePath
uriPath
indexFile
defaultCharset
public java.net.URL getResourceURL();
descriptor: ()Ljava/net/URL;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield io.dropwizard.servlets.assets.AssetServlet.resourcePath:Ljava/lang/String;
invokestatic com.google.common.io.Resources.getResource:(Ljava/lang/String;)Ljava/net/URL;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lio/dropwizard/servlets/assets/AssetServlet;
public java.lang.String getUriPath();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield io.dropwizard.servlets.assets.AssetServlet.uriPath:Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lio/dropwizard/servlets/assets/AssetServlet;
public java.lang.String getIndexFile();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield io.dropwizard.servlets.assets.AssetServlet.indexFile:Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lio/dropwizard/servlets/assets/AssetServlet;
RuntimeVisibleAnnotations:
javax.annotation.Nullable()
RuntimeVisibleTypeAnnotations:
METHOD_RETURN
javax.annotation.Nullable()
protected void doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse);
descriptor: (Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V
flags: (0x0004) ACC_PROTECTED
Code:
stack=3, locals=3, args_size=3
start local 0 0: new java.lang.Error
dup
ldc "Unresolved compilation problem: \n\tThe method getServletContext() is undefined for the type HttpServletRequest\n"
invokespecial java.lang.Error.<init>:(Ljava/lang/String;)V
athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lio/dropwizard/servlets/assets/AssetServlet;
Exceptions:
throws javax.servlet.ServletException, java.io.IOException
MethodParameters:
Name Flags
req
resp
private io.dropwizard.servlets.assets.AssetServlet$CachedAsset loadAsset(java.lang.String);
descriptor: (Ljava/lang/String;)Lio/dropwizard/servlets/assets/AssetServlet$CachedAsset;
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=7, args_size=2
start local 0 start local 1 0: aload 1
aload 0
getfield io.dropwizard.servlets.assets.AssetServlet.uriPath:Ljava/lang/String;
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
invokestatic com.google.common.base.Preconditions.checkArgument:(Z)V
1: getstatic io.dropwizard.servlets.assets.AssetServlet.SLASHES:Lcom/google/common/base/CharMatcher;
aload 1
aload 0
getfield io.dropwizard.servlets.assets.AssetServlet.uriPath:Ljava/lang/String;
invokevirtual java.lang.String.length:()I
invokevirtual java.lang.String.substring:(I)Ljava/lang/String;
invokevirtual com.google.common.base.CharMatcher.trimFrom:(Ljava/lang/CharSequence;)Ljava/lang/String;
astore 2
start local 2 2: getstatic io.dropwizard.servlets.assets.AssetServlet.SLASHES:Lcom/google/common/base/CharMatcher;
new java.lang.StringBuilder
dup
aload 0
getfield io.dropwizard.servlets.assets.AssetServlet.resourcePath:Ljava/lang/String;
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 2
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual com.google.common.base.CharMatcher.trimFrom:(Ljava/lang/CharSequence;)Ljava/lang/String;
astore 3
start local 3 3: aload 0
aload 3
invokevirtual io.dropwizard.servlets.assets.AssetServlet.getResourceUrl:(Ljava/lang/String;)Ljava/net/URL;
astore 4
start local 4 4: aload 4
invokestatic io.dropwizard.servlets.assets.ResourceURL.isDirectory:(Ljava/net/URL;)Z
ifeq 9
5: aload 0
getfield io.dropwizard.servlets.assets.AssetServlet.indexFile:Ljava/lang/String;
ifnull 8
6: aload 0
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
bipush 47
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
aload 0
getfield io.dropwizard.servlets.assets.AssetServlet.indexFile:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual io.dropwizard.servlets.assets.AssetServlet.getResourceUrl:(Ljava/lang/String;)Ljava/net/URL;
astore 4
7: goto 9
8: StackMap locals: java.lang.String java.lang.String java.net.URL
StackMap stack:
aconst_null
areturn
9: StackMap locals:
StackMap stack:
aload 4
invokestatic io.dropwizard.servlets.assets.ResourceURL.getLastModified:(Ljava/net/URL;)J
lstore 5
start local 5 10: lload 5
lconst_1
lcmp
ifge 12
11: invokestatic java.lang.System.currentTimeMillis:()J
lstore 5
12: StackMap locals: long
StackMap stack:
lload 5
ldc 1000
ldiv
ldc 1000
lmul
lstore 5
13: new io.dropwizard.servlets.assets.AssetServlet$CachedAsset
dup
aload 0
aload 4
invokevirtual io.dropwizard.servlets.assets.AssetServlet.readResource:(Ljava/net/URL;)[B
lload 5
invokespecial io.dropwizard.servlets.assets.AssetServlet$CachedAsset.<init>:([BJ)V
areturn
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 14 0 this Lio/dropwizard/servlets/assets/AssetServlet;
0 14 1 key Ljava/lang/String;
2 14 2 requestedResourcePath Ljava/lang/String;
3 14 3 absoluteRequestedResourcePath Ljava/lang/String;
4 14 4 requestedResourceURL Ljava/net/URL;
10 14 5 lastModified J
Exceptions:
throws java.net.URISyntaxException, java.io.IOException
RuntimeVisibleAnnotations:
javax.annotation.Nullable()
RuntimeVisibleTypeAnnotations:
METHOD_RETURN
javax.annotation.Nullable()
MethodParameters:
Name Flags
key
protected java.net.URL getResourceUrl(java.lang.String);
descriptor: (Ljava/lang/String;)Ljava/net/URL;
flags: (0x0004) ACC_PROTECTED
Code:
stack=1, locals=2, args_size=2
start local 0 start local 1 0: aload 1
invokestatic com.google.common.io.Resources.getResource:(Ljava/lang/String;)Ljava/net/URL;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lio/dropwizard/servlets/assets/AssetServlet;
0 1 1 absoluteRequestedResourcePath Ljava/lang/String;
MethodParameters:
Name Flags
absoluteRequestedResourcePath
protected byte[] readResource(java.net.URL);
descriptor: (Ljava/net/URL;)[B
flags: (0x0004) ACC_PROTECTED
Code:
stack=1, locals=2, args_size=2
start local 0 start local 1 0: aload 1
invokestatic com.google.common.io.Resources.toByteArray:(Ljava/net/URL;)[B
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lio/dropwizard/servlets/assets/AssetServlet;
0 1 1 requestedResourceURL Ljava/net/URL;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
requestedResourceURL
private boolean isCachedClientSide(javax.servlet.http.HttpServletRequest, io.dropwizard.servlets.assets.AssetServlet$CachedAsset);
descriptor: (Ljavax/servlet/http/HttpServletRequest;Lio/dropwizard/servlets/assets/AssetServlet$CachedAsset;)Z
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 2
invokevirtual io.dropwizard.servlets.assets.AssetServlet$CachedAsset.getETag:()Ljava/lang/String;
aload 1
ldc "If-None-Match"
invokeinterface javax.servlet.http.HttpServletRequest.getHeader:(Ljava/lang/String;)Ljava/lang/String;
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 3
1: aload 1
ldc "If-Modified-Since"
invokeinterface javax.servlet.http.HttpServletRequest.getDateHeader:(Ljava/lang/String;)J
aload 2
invokevirtual io.dropwizard.servlets.assets.AssetServlet$CachedAsset.getLastModifiedTime:()J
2: lcmp
ifge 3
iconst_0
ireturn
StackMap locals:
StackMap stack:
3: iconst_1
ireturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lio/dropwizard/servlets/assets/AssetServlet;
0 4 1 req Ljavax/servlet/http/HttpServletRequest;
0 4 2 cachedAsset Lio/dropwizard/servlets/assets/AssetServlet$CachedAsset;
MethodParameters:
Name Flags
req
cachedAsset
private com.google.common.collect.ImmutableList<io.dropwizard.servlets.assets.ByteRange> parseRangeHeader(java.lang.String, int);
descriptor: (Ljava/lang/String;I)Lcom/google/common/collect/ImmutableList;
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=8, args_size=3
start local 0 start local 1 start local 2 0: invokestatic com.google.common.collect.ImmutableList.builder:()Lcom/google/common/collect/ImmutableList$Builder;
astore 3
start local 3 1: aload 1
ldc "="
invokevirtual java.lang.String.contains:(Ljava/lang/CharSequence;)Z
ifeq 9
2: aload 1
ldc "="
invokevirtual java.lang.String.split:(Ljava/lang/String;)[Ljava/lang/String;
astore 4
start local 4 3: aload 4
arraylength
iconst_1
if_icmple 9
4: ldc ","
invokestatic com.google.common.base.Splitter.on:(Ljava/lang/String;)Lcom/google/common/base/Splitter;
invokevirtual com.google.common.base.Splitter.trimResults:()Lcom/google/common/base/Splitter;
aload 4
iconst_1
aaload
invokevirtual com.google.common.base.Splitter.splitToList:(Ljava/lang/CharSequence;)Ljava/util/List;
astore 5
start local 5 5: aload 5
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 7
goto 8
StackMap locals: io.dropwizard.servlets.assets.AssetServlet java.lang.String int com.google.common.collect.ImmutableList$Builder java.lang.String[] java.util.List top java.util.Iterator
StackMap stack:
6: aload 7
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.lang.String
astore 6
start local 6 7: aload 3
aload 6
iload 2
invokestatic io.dropwizard.servlets.assets.ByteRange.parse:(Ljava/lang/String;I)Lio/dropwizard/servlets/assets/ByteRange;
invokevirtual com.google.common.collect.ImmutableList$Builder.add:(Ljava/lang/Object;)Lcom/google/common/collect/ImmutableList$Builder;
pop
end local 6 8: StackMap locals:
StackMap stack:
aload 7
invokeinterface java.util.Iterator.hasNext:()Z
ifne 6
end local 5 end local 4 9: StackMap locals: io.dropwizard.servlets.assets.AssetServlet java.lang.String int com.google.common.collect.ImmutableList$Builder
StackMap stack:
aload 3
invokevirtual com.google.common.collect.ImmutableList$Builder.build:()Lcom/google/common/collect/ImmutableList;
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lio/dropwizard/servlets/assets/AssetServlet;
0 10 1 rangeHeader Ljava/lang/String;
0 10 2 resourceLength I
1 10 3 builder Lcom/google/common/collect/ImmutableList$Builder<Lio/dropwizard/servlets/assets/ByteRange;>;
3 9 4 parts [Ljava/lang/String;
5 9 5 ranges Ljava/util/List<Ljava/lang/String;>;
7 8 6 range Ljava/lang/String;
Signature: (Ljava/lang/String;I)Lcom/google/common/collect/ImmutableList<Lio/dropwizard/servlets/assets/ByteRange;>;
MethodParameters:
Name Flags
rangeHeader final
resourceLength final
}
SourceFile: "AssetServlet.java"
NestMembers:
io.dropwizard.servlets.assets.AssetServlet$CachedAsset
InnerClasses:
public final Builder = com.google.common.collect.ImmutableList$Builder of com.google.common.collect.ImmutableList
private CachedAsset = io.dropwizard.servlets.assets.AssetServlet$CachedAsset of io.dropwizard.servlets.assets.AssetServlet