class jdk.incubator.http.HttpResponse$FileDownloadBodyHandler implements jdk.incubator.http.HttpResponse$UntrustedBodyHandler<java.nio.file.Path>
minor version: 0
major version: 59
flags: flags: (0x0020) ACC_SUPER
this_class: jdk.incubator.http.HttpResponse$FileDownloadBodyHandler
super_class: java.lang.Object
{
private final java.nio.file.Path directory;
descriptor: Ljava/nio/file/Path;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.nio.file.OpenOption[] openOptions;
descriptor: [Ljava/nio/file/OpenOption;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private volatile java.security.AccessControlContext acc;
descriptor: Ljava/security/AccessControlContext;
flags: (0x0042) ACC_PRIVATE, ACC_VOLATILE
void <init>(java.nio.file.Path, java.nio.file.OpenOption[]);
descriptor: (Ljava/nio/file/Path;[Ljava/nio/file/OpenOption;)V
flags: (0x0080) ACC_VARARGS
Code:
stack=2, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
aload 1
putfield jdk.incubator.http.HttpResponse$FileDownloadBodyHandler.directory:Ljava/nio/file/Path;
2: aload 0
aload 2
putfield jdk.incubator.http.HttpResponse$FileDownloadBodyHandler.openOptions:[Ljava/nio/file/OpenOption;
3: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Ljdk/incubator/http/HttpResponse$FileDownloadBodyHandler;
0 4 1 directory Ljava/nio/file/Path;
0 4 2 openOptions [Ljava/nio/file/OpenOption;
MethodParameters:
Name Flags
directory
openOptions
public void setAccessControlContext(java.security.AccessControlContext);
descriptor: (Ljava/security/AccessControlContext;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
putfield jdk.incubator.http.HttpResponse$FileDownloadBodyHandler.acc:Ljava/security/AccessControlContext;
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljdk/incubator/http/HttpResponse$FileDownloadBodyHandler;
0 2 1 acc Ljava/security/AccessControlContext;
MethodParameters:
Name Flags
acc
public jdk.incubator.http.HttpResponse$BodySubscriber<java.nio.file.Path> apply(int, jdk.incubator.http.HttpHeaders);
descriptor: (ILjdk/incubator/http/HttpHeaders;)Ljdk/incubator/http/HttpResponse$BodySubscriber;
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=9, args_size=3
start local 0 start local 1 start local 2 0: aload 2
ldc "Content-Disposition"
invokevirtual jdk.incubator.http.HttpHeaders.firstValue:(Ljava/lang/String;)Ljava/util/Optional;
1: invokedynamic get()Ljava/util/function/Supplier;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
()Ljava/lang/Object;
jdk/incubator/http/HttpResponse$FileDownloadBodyHandler.lambda$0()Ljava/io/UncheckedIOException; (6)
()Ljava/io/UncheckedIOException;
invokevirtual java.util.Optional.orElseThrow:(Ljava/util/function/Supplier;)Ljava/lang/Object;
checkcast java.lang.String
2: astore 3
start local 3 3: aload 3
ldc "attachment;"
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifne 5
4: new java.io.IOException
dup
ldc "Unknown Content-Disposition type"
invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
invokestatic jdk.incubator.http.internal.common.Utils.unchecked:(Ljava/io/IOException;)Ljava/io/UncheckedIOException;
athrow
5: StackMap locals: java.lang.String
StackMap stack:
aload 3
ldc "filename="
invokevirtual java.lang.String.indexOf:(Ljava/lang/String;)I
istore 4
start local 4 6: iload 4
iconst_m1
if_icmpne 8
7: new java.io.IOException
dup
ldc "Bad Content-Disposition type"
invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
invokestatic jdk.incubator.http.internal.common.Utils.unchecked:(Ljava/io/IOException;)Ljava/io/UncheckedIOException;
athrow
8: StackMap locals: int
StackMap stack:
aload 3
bipush 59
invokevirtual java.lang.String.lastIndexOf:(I)I
istore 5
start local 5 9: iload 5
iload 4
if_icmpge 12
10: aload 3
iload 4
bipush 9
iadd
invokevirtual java.lang.String.substring:(I)Ljava/lang/String;
astore 6
start local 6 11: goto 13
end local 6 12: StackMap locals: int
StackMap stack:
aload 3
iload 4
bipush 9
iadd
iload 5
invokevirtual java.lang.String.substring:(II)Ljava/lang/String;
astore 6
start local 6 13: StackMap locals: java.lang.String
StackMap stack:
aload 0
getfield jdk.incubator.http.HttpResponse$FileDownloadBodyHandler.directory:Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.toString:()Ljava/lang/String;
iconst_1
anewarray java.lang.String
dup
iconst_0
aload 6
aastore
invokestatic java.nio.file.Paths.get:(Ljava/lang/String;[Ljava/lang/String;)Ljava/nio/file/Path;
astore 7
start local 7 14: aload 7
aload 0
getfield jdk.incubator.http.HttpResponse$FileDownloadBodyHandler.openOptions:[Ljava/nio/file/OpenOption;
invokestatic jdk.incubator.http.HttpResponse$BodySubscriber.asFileImpl:(Ljava/nio/file/Path;[Ljava/nio/file/OpenOption;)Ljdk/incubator/http/HttpResponse$BodySubscriber;
15: checkcast jdk.incubator.http.ResponseSubscribers$PathSubscriber
astore 8
start local 8 16: aload 8
aload 0
getfield jdk.incubator.http.HttpResponse$FileDownloadBodyHandler.acc:Ljava/security/AccessControlContext;
invokevirtual jdk.incubator.http.ResponseSubscribers$PathSubscriber.setAccessControlContext:(Ljava/security/AccessControlContext;)V
17: aload 8
areturn
end local 8 end local 7 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 18 0 this Ljdk/incubator/http/HttpResponse$FileDownloadBodyHandler;
0 18 1 statusCode I
0 18 2 headers Ljdk/incubator/http/HttpHeaders;
3 18 3 dispoHeader Ljava/lang/String;
6 18 4 n I
9 18 5 lastsemi I
11 12 6 disposition Ljava/lang/String;
13 18 6 disposition Ljava/lang/String;
14 18 7 file Ljava/nio/file/Path;
16 18 8 bs Ljdk/incubator/http/ResponseSubscribers$PathSubscriber;
Signature: (ILjdk/incubator/http/HttpHeaders;)Ljdk/incubator/http/HttpResponse$BodySubscriber<Ljava/nio/file/Path;>;
MethodParameters:
Name Flags
statusCode
headers
private static java.io.UncheckedIOException lambda$0();
descriptor: ()Ljava/io/UncheckedIOException;
flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
Code:
stack=3, locals=0, args_size=0
0: new java.io.IOException
dup
ldc "No Content-Disposition"
invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
invokestatic jdk.incubator.http.internal.common.Utils.unchecked:(Ljava/io/IOException;)Ljava/io/UncheckedIOException;
areturn
LocalVariableTable:
Start End Slot Name Signature
}
Signature: Ljava/lang/Object;Ljdk/incubator/http/HttpResponse$UntrustedBodyHandler<Ljava/nio/file/Path;>;
SourceFile: "HttpResponse.java"
NestHost: jdk.incubator.http.HttpResponse
InnerClasses:
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles
public abstract BodySubscriber = jdk.incubator.http.HttpResponse$BodySubscriber of jdk.incubator.http.HttpResponse
FileDownloadBodyHandler = jdk.incubator.http.HttpResponse$FileDownloadBodyHandler of jdk.incubator.http.HttpResponse
abstract UntrustedBodyHandler = jdk.incubator.http.HttpResponse$UntrustedBodyHandler of jdk.incubator.http.HttpResponse
PathSubscriber = jdk.incubator.http.ResponseSubscribers$PathSubscriber of jdk.incubator.http.ResponseSubscribers