public class jdk.internal.net.http.RequestPublishers$FilePublisher implements java.net.http.HttpRequest$BodyPublisher
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: jdk.internal.net.http.RequestPublishers$FilePublisher
super_class: java.lang.Object
{
private static final java.io.FilePermission[] EMPTY_FILE_PERMISSIONS;
descriptor: [Ljava/io/FilePermission;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private final java.io.File file;
descriptor: Ljava/io/File;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.io.FilePermission[] filePermissions;
descriptor: [Ljava/io/FilePermission;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
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 Ljdk/internal/net/http/RequestPublishers;
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 jdk.internal.net.http.RequestPublishers$FilePublisher.$assertionsDisabled:Z
3: iconst_0
anewarray java.io.FilePermission
putstatic jdk.internal.net.http.RequestPublishers$FilePublisher.EMPTY_FILE_PERMISSIONS:[Ljava/io/FilePermission;
return
LocalVariableTable:
Start End Slot Name Signature
private static java.lang.String pathForSecurityCheck(java.nio.file.Path);
descriptor: (Ljava/nio/file/Path;)Ljava/lang/String;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokeinterface java.nio.file.Path.toFile:()Ljava/io/File;
invokevirtual java.io.File.getPath:()Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 path Ljava/nio/file/Path;
MethodParameters:
Name Flags
path
public static jdk.internal.net.http.RequestPublishers$FilePublisher create(java.nio.file.Path);
descriptor: (Ljava/nio/file/Path;)Ljdk/internal/net/http/RequestPublishers$FilePublisher;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=5, args_size=1
start local 0 0: aconst_null
astore 1
start local 1 1: invokestatic java.lang.System.getSecurityManager:()Ljava/lang/SecurityManager;
astore 2
start local 2 2: aload 2
ifnull 7
3: aload 0
invokestatic jdk.internal.net.http.RequestPublishers$FilePublisher.pathForSecurityCheck:(Ljava/nio/file/Path;)Ljava/lang/String;
astore 3
start local 3 4: new java.io.FilePermission
dup
aload 3
ldc "read"
invokespecial java.io.FilePermission.<init>:(Ljava/lang/String;Ljava/lang/String;)V
astore 4
start local 4 5: aload 2
aload 4
invokevirtual java.lang.SecurityManager.checkPermission:(Ljava/security/Permission;)V
6: aload 4
astore 1
end local 4 end local 3 7: StackMap locals: java.io.FilePermission java.lang.SecurityManager
StackMap stack:
aload 0
iconst_0
anewarray java.nio.file.LinkOption
invokestatic java.nio.file.Files.notExists:(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z
ifeq 9
8: new java.io.FileNotFoundException
dup
new java.lang.StringBuilder
dup
invokespecial java.lang.StringBuilder.<init>:()V
aload 0
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc " not found"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.io.FileNotFoundException.<init>:(Ljava/lang/String;)V
athrow
9: StackMap locals:
StackMap stack:
new jdk.internal.net.http.RequestPublishers$FilePublisher
dup
aload 0
aload 1
invokespecial jdk.internal.net.http.RequestPublishers$FilePublisher.<init>:(Ljava/nio/file/Path;Ljava/io/FilePermission;)V
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 path Ljava/nio/file/Path;
1 10 1 filePermission Ljava/io/FilePermission;
2 10 2 sm Ljava/lang/SecurityManager;
4 7 3 fn Ljava/lang/String;
5 7 4 readPermission Ljava/io/FilePermission;
Exceptions:
throws java.io.FileNotFoundException
MethodParameters:
Name Flags
path
private void <init>(java.nio.file.Path, java.io.FilePermission);
descriptor: (Ljava/nio/file/Path;Ljava/io/FilePermission;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: getstatic jdk.internal.net.http.RequestPublishers$FilePublisher.$assertionsDisabled:Z
ifne 2
aload 2
ifnull 2
aload 2
invokevirtual java.io.FilePermission.getActions:()Ljava/lang/String;
ldc "read"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 2
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
2: StackMap locals: jdk.internal.net.http.RequestPublishers$FilePublisher java.nio.file.Path java.io.FilePermission
StackMap stack:
aload 0
aload 1
invokeinterface java.nio.file.Path.toFile:()Ljava/io/File;
putfield jdk.internal.net.http.RequestPublishers$FilePublisher.file:Ljava/io/File;
3: aload 0
aload 2
ifnonnull 4
getstatic jdk.internal.net.http.RequestPublishers$FilePublisher.EMPTY_FILE_PERMISSIONS:[Ljava/io/FilePermission;
goto 5
4: StackMap locals:
StackMap stack: jdk.internal.net.http.RequestPublishers$FilePublisher
iconst_1
anewarray java.io.FilePermission
dup
iconst_0
aload 2
aastore
5: StackMap locals: jdk.internal.net.http.RequestPublishers$FilePublisher java.nio.file.Path java.io.FilePermission
StackMap stack: jdk.internal.net.http.RequestPublishers$FilePublisher java.io.FilePermission[]
putfield jdk.internal.net.http.RequestPublishers$FilePublisher.filePermissions:[Ljava/io/FilePermission;
6: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Ljdk/internal/net/http/RequestPublishers$FilePublisher;
0 7 1 name Ljava/nio/file/Path;
0 7 2 filePermission Ljava/io/FilePermission;
MethodParameters:
Name Flags
name
filePermission
public void subscribe(java.util.concurrent.Flow$Subscriber<? super java.nio.ByteBuffer>);
descriptor: (Ljava/util/concurrent/Flow$Subscriber;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=4, args_size=2
start local 0 start local 1 0: invokestatic java.lang.System.getSecurityManager:()Ljava/lang/SecurityManager;
ifnonnull 5
1: new java.io.FileInputStream
dup
aload 0
getfield jdk.internal.net.http.RequestPublishers$FilePublisher.file:Ljava/io/File;
invokespecial java.io.FileInputStream.<init>:(Ljava/io/File;)V
astore 2
start local 2 2: goto 11
end local 2 StackMap locals:
StackMap stack: java.io.IOException
3: astore 3
start local 3 4: new java.io.UncheckedIOException
dup
aload 3
invokespecial java.io.UncheckedIOException.<init>:(Ljava/io/IOException;)V
athrow
end local 3 5: StackMap locals:
StackMap stack:
aload 0
invokedynamic run(Ljdk/internal/net/http/RequestPublishers$FilePublisher;)Ljava/security/PrivilegedExceptionAction;
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/internal/net/http/RequestPublishers$FilePublisher.lambda$0()Ljava/io/FileInputStream; (7)
()Ljava/io/FileInputStream;
6: astore 3
start local 3 7: aload 3
aconst_null
aload 0
getfield jdk.internal.net.http.RequestPublishers$FilePublisher.filePermissions:[Ljava/io/FilePermission;
invokestatic java.security.AccessController.doPrivileged:(Ljava/security/PrivilegedExceptionAction;Ljava/security/AccessControlContext;[Ljava/security/Permission;)Ljava/lang/Object;
checkcast java.io.InputStream
astore 2
end local 3 start local 2 8: goto 11
end local 2 StackMap locals:
StackMap stack: java.security.PrivilegedActionException
9: astore 3
start local 3 10: new java.io.UncheckedIOException
dup
aload 3
invokevirtual java.security.PrivilegedActionException.getCause:()Ljava/lang/Throwable;
checkcast java.io.IOException
invokespecial java.io.UncheckedIOException.<init>:(Ljava/io/IOException;)V
athrow
end local 3 start local 2 11: StackMap locals: java.io.InputStream
StackMap stack:
new jdk.internal.net.http.PullPublisher
dup
aload 2
invokedynamic iterator(Ljava/io/InputStream;)Ljava/lang/Iterable;
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/util/Iterator;
jdk/internal/net/http/RequestPublishers$FilePublisher.lambda$1(Ljava/io/InputStream;)Ljava/util/Iterator; (6)
()Ljava/util/Iterator;
invokespecial jdk.internal.net.http.PullPublisher.<init>:(Ljava/lang/Iterable;)V
12: astore 3
start local 3 13: aload 3
aload 1
invokevirtual jdk.internal.net.http.PullPublisher.subscribe:(Ljava/util/concurrent/Flow$Subscriber;)V
14: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 15 0 this Ljdk/internal/net/http/RequestPublishers$FilePublisher;
0 15 1 subscriber Ljava/util/concurrent/Flow$Subscriber<-Ljava/nio/ByteBuffer;>;
2 3 2 is Ljava/io/InputStream;
8 9 2 is Ljava/io/InputStream;
11 15 2 is Ljava/io/InputStream;
4 5 3 ioe Ljava/io/IOException;
7 8 3 pa Ljava/security/PrivilegedExceptionAction<Ljava/io/FileInputStream;>;
10 11 3 pae Ljava/security/PrivilegedActionException;
13 15 3 publisher Ljdk/internal/net/http/PullPublisher<Ljava/nio/ByteBuffer;>;
Exception table:
from to target type
1 2 3 Class java.io.IOException
5 8 9 Class java.security.PrivilegedActionException
Signature: (Ljava/util/concurrent/Flow$Subscriber<-Ljava/nio/ByteBuffer;>;)V
MethodParameters:
Name Flags
subscriber
public long contentLength();
descriptor: ()J
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=1
start local 0 0: invokestatic java.lang.System.getSecurityManager:()Ljava/lang/SecurityManager;
ifnonnull 2
1: aload 0
getfield jdk.internal.net.http.RequestPublishers$FilePublisher.file:Ljava/io/File;
invokevirtual java.io.File.length:()J
lreturn
2: StackMap locals:
StackMap stack:
aload 0
invokedynamic run(Ljdk/internal/net/http/RequestPublishers$FilePublisher;)Ljava/security/PrivilegedAction;
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/internal/net/http/RequestPublishers$FilePublisher.lambda$2()Ljava/lang/Long; (7)
()Ljava/lang/Long;
astore 1
start local 1 3: aload 1
aconst_null
aload 0
getfield jdk.internal.net.http.RequestPublishers$FilePublisher.filePermissions:[Ljava/io/FilePermission;
invokestatic java.security.AccessController.doPrivileged:(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;[Ljava/security/Permission;)Ljava/lang/Object;
checkcast java.lang.Long
invokevirtual java.lang.Long.longValue:()J
lreturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Ljdk/internal/net/http/RequestPublishers$FilePublisher;
3 4 1 pa Ljava/security/PrivilegedAction<Ljava/lang/Long;>;
private java.io.FileInputStream lambda$0();
descriptor: ()Ljava/io/FileInputStream;
flags: (0x1002) ACC_PRIVATE, ACC_SYNTHETIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: new java.io.FileInputStream
dup
aload 0
getfield jdk.internal.net.http.RequestPublishers$FilePublisher.file:Ljava/io/File;
invokespecial java.io.FileInputStream.<init>:(Ljava/io/File;)V
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/internal/net/http/RequestPublishers$FilePublisher;
Exceptions:
throws java.lang.Exception
private static java.util.Iterator lambda$1(java.io.InputStream);
descriptor: (Ljava/io/InputStream;)Ljava/util/Iterator;
flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
Code:
stack=3, locals=1, args_size=1
0: new jdk.internal.net.http.RequestPublishers$StreamIterator
dup
aload 0
invokespecial jdk.internal.net.http.RequestPublishers$StreamIterator.<init>:(Ljava/io/InputStream;)V
areturn
LocalVariableTable:
Start End Slot Name Signature
private java.lang.Long lambda$2();
descriptor: ()Ljava/lang/Long;
flags: (0x1002) ACC_PRIVATE, ACC_SYNTHETIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield jdk.internal.net.http.RequestPublishers$FilePublisher.file:Ljava/io/File;
invokevirtual java.io.File.length:()J
invokestatic java.lang.Long.valueOf:(J)Ljava/lang/Long;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/internal/net/http/RequestPublishers$FilePublisher;
}
SourceFile: "RequestPublishers.java"
NestHost: jdk.internal.net.http.RequestPublishers
InnerClasses:
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles
public abstract BodyPublisher = java.net.http.HttpRequest$BodyPublisher of java.net.http.HttpRequest
public abstract Subscriber = java.util.concurrent.Flow$Subscriber of java.util.concurrent.Flow
public FilePublisher = jdk.internal.net.http.RequestPublishers$FilePublisher of jdk.internal.net.http.RequestPublishers
public StreamIterator = jdk.internal.net.http.RequestPublishers$StreamIterator of jdk.internal.net.http.RequestPublishers