public class java.io.FileOutputStream extends java.io.OutputStream
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: java.io.FileOutputStream
super_class: java.io.OutputStream
{
private static final jdk.internal.misc.JavaIOFileDescriptorAccess fdAccess;
descriptor: Ljdk/internal/misc/JavaIOFileDescriptorAccess;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private final java.io.FileDescriptor fd;
descriptor: Ljava/io/FileDescriptor;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private volatile java.nio.channels.FileChannel channel;
descriptor: Ljava/nio/channels/FileChannel;
flags: (0x0042) ACC_PRIVATE, ACC_VOLATILE
private final java.lang.String path;
descriptor: Ljava/lang/String;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.lang.Object closeLock;
descriptor: Ljava/lang/Object;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private volatile boolean closed;
descriptor: Z
flags: (0x0042) ACC_PRIVATE, ACC_VOLATILE
private final java.io.FileOutputStream$AltFinalizer altFinalizer;
descriptor: Ljava/io/FileOutputStream$AltFinalizer;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: invokestatic jdk.internal.misc.SharedSecrets.getJavaIOFileDescriptorAccess:()Ljdk/internal/misc/JavaIOFileDescriptorAccess;
1: putstatic java.io.FileOutputStream.fdAccess:Ljdk/internal/misc/JavaIOFileDescriptorAccess;
2: invokestatic java.io.FileOutputStream.initIDs:()V
3: return
LocalVariableTable:
Start End Slot Name Signature
public void <init>(java.lang.String);
descriptor: (Ljava/lang/String;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
ifnull 1
new java.io.File
dup
aload 1
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
goto 2
StackMap locals:
StackMap stack: uninitialized-this
1: aconst_null
StackMap locals: uninitialized-this java.lang.String
StackMap stack: uninitialized-this java.io.File
2: iconst_0
invokespecial java.io.FileOutputStream.<init>:(Ljava/io/File;Z)V
3: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Ljava/io/FileOutputStream;
0 4 1 name Ljava/lang/String;
Exceptions:
throws java.io.FileNotFoundException
MethodParameters:
Name Flags
name
public void <init>(java.lang.String, boolean);
descriptor: (Ljava/lang/String;Z)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 1
ifnull 1
new java.io.File
dup
aload 1
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
goto 2
StackMap locals:
StackMap stack: uninitialized-this
1: aconst_null
StackMap locals: uninitialized-this java.lang.String int
StackMap stack: uninitialized-this java.io.File
2: iload 2
invokespecial java.io.FileOutputStream.<init>:(Ljava/io/File;Z)V
3: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Ljava/io/FileOutputStream;
0 4 1 name Ljava/lang/String;
0 4 2 append Z
Exceptions:
throws java.io.FileNotFoundException
MethodParameters:
Name Flags
name
append
public void <init>(java.io.File);
descriptor: (Ljava/io/File;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
iconst_0
invokespecial java.io.FileOutputStream.<init>:(Ljava/io/File;Z)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljava/io/FileOutputStream;
0 2 1 file Ljava/io/File;
Exceptions:
throws java.io.FileNotFoundException
MethodParameters:
Name Flags
file
public void <init>(java.io.File, boolean);
descriptor: (Ljava/io/File;Z)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=5, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokespecial java.io.OutputStream.<init>:()V
1: aload 0
new java.lang.Object
dup
invokespecial java.lang.Object.<init>:()V
putfield java.io.FileOutputStream.closeLock:Ljava/lang/Object;
2: aload 1
ifnull 3
aload 1
invokevirtual java.io.File.getPath:()Ljava/lang/String;
goto 4
StackMap locals: java.io.FileOutputStream java.io.File int
StackMap stack:
3: aconst_null
StackMap locals:
StackMap stack: java.lang.String
4: astore 3
start local 3 5: invokestatic java.lang.System.getSecurityManager:()Ljava/lang/SecurityManager;
astore 4
start local 4 6: aload 4
ifnull 8
7: aload 4
aload 3
invokevirtual java.lang.SecurityManager.checkWrite:(Ljava/lang/String;)V
8: StackMap locals: java.lang.String java.lang.SecurityManager
StackMap stack:
aload 3
ifnonnull 10
9: new java.lang.NullPointerException
dup
invokespecial java.lang.NullPointerException.<init>:()V
athrow
10: StackMap locals:
StackMap stack:
aload 1
invokevirtual java.io.File.isInvalid:()Z
ifeq 12
11: new java.io.FileNotFoundException
dup
ldc "Invalid file path"
invokespecial java.io.FileNotFoundException.<init>:(Ljava/lang/String;)V
athrow
12: StackMap locals:
StackMap stack:
aload 0
new java.io.FileDescriptor
dup
invokespecial java.io.FileDescriptor.<init>:()V
putfield java.io.FileOutputStream.fd:Ljava/io/FileDescriptor;
13: aload 0
getfield java.io.FileOutputStream.fd:Ljava/io/FileDescriptor;
aload 0
invokevirtual java.io.FileDescriptor.attach:(Ljava/io/Closeable;)V
14: aload 0
aload 3
putfield java.io.FileOutputStream.path:Ljava/lang/String;
15: aload 0
aload 3
iload 2
invokevirtual java.io.FileOutputStream.open:(Ljava/lang/String;Z)V
16: aload 0
aload 0
invokestatic java.io.FileOutputStream$AltFinalizer.get:(Ljava/io/FileOutputStream;)Ljava/io/FileOutputStream$AltFinalizer;
putfield java.io.FileOutputStream.altFinalizer:Ljava/io/FileOutputStream$AltFinalizer;
17: aload 0
getfield java.io.FileOutputStream.altFinalizer:Ljava/io/FileOutputStream$AltFinalizer;
ifnonnull 19
18: aload 0
getfield java.io.FileOutputStream.fd:Ljava/io/FileDescriptor;
invokevirtual java.io.FileDescriptor.registerCleanup:()V
19: StackMap locals:
StackMap stack:
return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 20 0 this Ljava/io/FileOutputStream;
0 20 1 file Ljava/io/File;
0 20 2 append Z
5 20 3 name Ljava/lang/String;
6 20 4 security Ljava/lang/SecurityManager;
Exceptions:
throws java.io.FileNotFoundException
MethodParameters:
Name Flags
file
append
public void <init>(java.io.FileDescriptor);
descriptor: (Ljava/io/FileDescriptor;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.io.OutputStream.<init>:()V
1: aload 0
new java.lang.Object
dup
invokespecial java.lang.Object.<init>:()V
putfield java.io.FileOutputStream.closeLock:Ljava/lang/Object;
2: invokestatic java.lang.System.getSecurityManager:()Ljava/lang/SecurityManager;
astore 2
start local 2 3: aload 1
ifnonnull 5
4: new java.lang.NullPointerException
dup
invokespecial java.lang.NullPointerException.<init>:()V
athrow
5: StackMap locals: java.io.FileOutputStream java.io.FileDescriptor java.lang.SecurityManager
StackMap stack:
aload 2
ifnull 7
6: aload 2
aload 1
invokevirtual java.lang.SecurityManager.checkWrite:(Ljava/io/FileDescriptor;)V
7: StackMap locals:
StackMap stack:
aload 0
aload 1
putfield java.io.FileOutputStream.fd:Ljava/io/FileDescriptor;
8: aload 0
aconst_null
putfield java.io.FileOutputStream.path:Ljava/lang/String;
9: aload 0
aconst_null
putfield java.io.FileOutputStream.altFinalizer:Ljava/io/FileOutputStream$AltFinalizer;
10: aload 0
getfield java.io.FileOutputStream.fd:Ljava/io/FileDescriptor;
aload 0
invokevirtual java.io.FileDescriptor.attach:(Ljava/io/Closeable;)V
11: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Ljava/io/FileOutputStream;
0 12 1 fdObj Ljava/io/FileDescriptor;
3 12 2 security Ljava/lang/SecurityManager;
MethodParameters:
Name Flags
fdObj
private native void open0(java.lang.String, boolean);
descriptor: (Ljava/lang/String;Z)V
flags: (0x0102) ACC_PRIVATE, ACC_NATIVE
Exceptions:
throws java.io.FileNotFoundException
MethodParameters:
Name Flags
name
append
private void open(java.lang.String, boolean);
descriptor: (Ljava/lang/String;Z)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 1
iload 2
invokevirtual java.io.FileOutputStream.open0:(Ljava/lang/String;Z)V
1: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljava/io/FileOutputStream;
0 2 1 name Ljava/lang/String;
0 2 2 append Z
Exceptions:
throws java.io.FileNotFoundException
MethodParameters:
Name Flags
name
append
private native void write(int, boolean);
descriptor: (IZ)V
flags: (0x0102) ACC_PRIVATE, ACC_NATIVE
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
b
append
public void write(int);
descriptor: (I)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: aload 0
iload 1
getstatic java.io.FileOutputStream.fdAccess:Ljdk/internal/misc/JavaIOFileDescriptorAccess;
aload 0
getfield java.io.FileOutputStream.fd:Ljava/io/FileDescriptor;
invokeinterface jdk.internal.misc.JavaIOFileDescriptorAccess.getAppend:(Ljava/io/FileDescriptor;)Z
invokevirtual java.io.FileOutputStream.write:(IZ)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljava/io/FileOutputStream;
0 2 1 b I
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
b
private native void writeBytes(byte[], int, int, boolean);
descriptor: ([BIIZ)V
flags: (0x0102) ACC_PRIVATE, ACC_NATIVE
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
b
off
len
append
public void write(byte[]);
descriptor: ([B)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
iconst_0
aload 1
arraylength
getstatic java.io.FileOutputStream.fdAccess:Ljdk/internal/misc/JavaIOFileDescriptorAccess;
aload 0
getfield java.io.FileOutputStream.fd:Ljava/io/FileDescriptor;
invokeinterface jdk.internal.misc.JavaIOFileDescriptorAccess.getAppend:(Ljava/io/FileDescriptor;)Z
invokevirtual java.io.FileOutputStream.writeBytes:([BIIZ)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljava/io/FileOutputStream;
0 2 1 b [B
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
b
public void write(byte[], int, int);
descriptor: ([BII)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
aload 1
iload 2
iload 3
getstatic java.io.FileOutputStream.fdAccess:Ljdk/internal/misc/JavaIOFileDescriptorAccess;
aload 0
getfield java.io.FileOutputStream.fd:Ljava/io/FileDescriptor;
invokeinterface jdk.internal.misc.JavaIOFileDescriptorAccess.getAppend:(Ljava/io/FileDescriptor;)Z
invokevirtual java.io.FileOutputStream.writeBytes:([BIIZ)V
1: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljava/io/FileOutputStream;
0 2 1 b [B
0 2 2 off I
0 2 3 len I
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
b
off
len
public void close();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=2, args_size=1
start local 0 0: aload 0
getfield java.io.FileOutputStream.closed:Z
ifeq 2
1: return
2: StackMap locals:
StackMap stack:
aload 0
getfield java.io.FileOutputStream.closeLock:Ljava/lang/Object;
dup
astore 1
monitorenter
3: aload 0
getfield java.io.FileOutputStream.closed:Z
ifeq 6
4: aload 1
monitorexit
5: return
6: StackMap locals: java.lang.Object
StackMap stack:
aload 0
iconst_1
putfield java.io.FileOutputStream.closed:Z
7: aload 1
monitorexit
8: goto 11
StackMap locals:
StackMap stack: java.lang.Throwable
9: aload 1
monitorexit
10: athrow
11: StackMap locals:
StackMap stack:
aload 0
getfield java.io.FileOutputStream.channel:Ljava/nio/channels/FileChannel;
astore 1
start local 1 12: aload 1
ifnull 14
13: aload 1
invokevirtual java.nio.channels.FileChannel.close:()V
14: StackMap locals: java.nio.channels.FileChannel
StackMap stack:
aload 0
getfield java.io.FileOutputStream.fd:Ljava/io/FileDescriptor;
new java.io.FileOutputStream$1
dup
aload 0
invokespecial java.io.FileOutputStream$1.<init>:(Ljava/io/FileOutputStream;)V
invokevirtual java.io.FileDescriptor.closeAll:(Ljava/io/Closeable;)V
15: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 16 0 this Ljava/io/FileOutputStream;
12 16 1 fc Ljava/nio/channels/FileChannel;
Exception table:
from to target type
3 5 9 any
6 8 9 any
9 10 9 any
Exceptions:
throws java.io.IOException
public final java.io.FileDescriptor getFD();
descriptor: ()Ljava/io/FileDescriptor;
flags: (0x0011) ACC_PUBLIC, ACC_FINAL
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield java.io.FileOutputStream.fd:Ljava/io/FileDescriptor;
ifnull 2
1: aload 0
getfield java.io.FileOutputStream.fd:Ljava/io/FileDescriptor;
areturn
2: StackMap locals:
StackMap stack:
new java.io.IOException
dup
invokespecial java.io.IOException.<init>:()V
athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Ljava/io/FileOutputStream;
Exceptions:
throws java.io.IOException
public java.nio.channels.FileChannel getChannel();
descriptor: ()Ljava/nio/channels/FileChannel;
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=4, args_size=1
start local 0 0: aload 0
getfield java.io.FileOutputStream.channel:Ljava/nio/channels/FileChannel;
astore 1
start local 1 1: aload 1
ifnonnull 17
2: aload 0
dup
astore 2
monitorenter
3: aload 0
getfield java.io.FileOutputStream.channel:Ljava/nio/channels/FileChannel;
astore 1
4: aload 1
ifnonnull 13
5: aload 0
aload 0
getfield java.io.FileOutputStream.fd:Ljava/io/FileDescriptor;
aload 0
getfield java.io.FileOutputStream.path:Ljava/lang/String;
iconst_0
6: iconst_1
iconst_0
aload 0
7: invokestatic sun.nio.ch.FileChannelImpl.open:(Ljava/io/FileDescriptor;Ljava/lang/String;ZZZLjava/lang/Object;)Ljava/nio/channels/FileChannel;
dup
astore 1
putfield java.io.FileOutputStream.channel:Ljava/nio/channels/FileChannel;
8: aload 0
getfield java.io.FileOutputStream.closed:Z
ifeq 13
9: aload 1
invokevirtual java.nio.channels.FileChannel.close:()V
10: goto 13
StackMap locals: java.io.FileOutputStream java.nio.channels.FileChannel java.io.FileOutputStream
StackMap stack: java.io.IOException
11: astore 3
start local 3 12: new java.lang.InternalError
dup
aload 3
invokespecial java.lang.InternalError.<init>:(Ljava/lang/Throwable;)V
athrow
end local 3 13: StackMap locals:
StackMap stack:
aload 2
monitorexit
14: goto 17
StackMap locals:
StackMap stack: java.lang.Throwable
15: aload 2
monitorexit
16: athrow
17: StackMap locals:
StackMap stack:
aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 18 0 this Ljava/io/FileOutputStream;
1 18 1 fc Ljava/nio/channels/FileChannel;
12 13 3 ioe Ljava/io/IOException;
Exception table:
from to target type
9 10 11 Class java.io.IOException
3 14 15 any
15 16 15 any
protected void finalize();
descriptor: ()V
flags: (0x0004) ACC_PROTECTED
Code:
stack=0, locals=1, args_size=1
start local 0 0: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljava/io/FileOutputStream;
Exceptions:
throws java.io.IOException
RuntimeVisibleAnnotations:
java.lang.Deprecated(since = "9", forRemoval = true)
private static native void initIDs();
descriptor: ()V
flags: (0x010a) ACC_PRIVATE, ACC_STATIC, ACC_NATIVE
}
SourceFile: "FileOutputStream.java"
NestMembers:
java.io.FileOutputStream$1 java.io.FileOutputStream$AltFinalizer
InnerClasses:
java.io.FileOutputStream$1
AltFinalizer = java.io.FileOutputStream$AltFinalizer of java.io.FileOutputStream