public class io.netty.channel.DefaultFileRegion extends io.netty.util.AbstractReferenceCounted implements io.netty.channel.FileRegion
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: io.netty.channel.DefaultFileRegion
super_class: io.netty.util.AbstractReferenceCounted
{
private static final io.netty.util.internal.logging.InternalLogger logger;
descriptor: Lio/netty/util/internal/logging/InternalLogger;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private final java.io.File f;
descriptor: Ljava/io/File;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final long position;
descriptor: J
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final long count;
descriptor: J
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private long transferred;
descriptor: J
flags: (0x0002) ACC_PRIVATE
private java.nio.channels.FileChannel file;
descriptor: Ljava/nio/channels/FileChannel;
flags: (0x0002) ACC_PRIVATE
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: ldc Lio/netty/channel/DefaultFileRegion;
invokestatic io.netty.util.internal.logging.InternalLoggerFactory.getInstance:(Ljava/lang/Class;)Lio/netty/util/internal/logging/InternalLogger;
putstatic io.netty.channel.DefaultFileRegion.logger:Lio/netty/util/internal/logging/InternalLogger;
return
LocalVariableTable:
Start End Slot Name Signature
public void <init>(java.nio.channels.FileChannel, long, long);
descriptor: (Ljava/nio/channels/FileChannel;JJ)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=6, args_size=4
start local 0 start local 1 start local 2 start local 4 0: aload 0
invokespecial io.netty.util.AbstractReferenceCounted.<init>:()V
1: aload 1
ifnonnull 3
2: new java.lang.NullPointerException
dup
ldc "file"
invokespecial java.lang.NullPointerException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals: io.netty.channel.DefaultFileRegion java.nio.channels.FileChannel long long
StackMap stack:
lload 2
lconst_0
lcmp
ifge 5
4: new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
ldc "position must be >= 0 but was "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
lload 2
invokevirtual java.lang.StringBuilder.append:(J)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
5: StackMap locals:
StackMap stack:
lload 4
lconst_0
lcmp
ifge 7
6: new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
ldc "count must be >= 0 but was "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
lload 4
invokevirtual java.lang.StringBuilder.append:(J)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
7: StackMap locals:
StackMap stack:
aload 0
aload 1
putfield io.netty.channel.DefaultFileRegion.file:Ljava/nio/channels/FileChannel;
8: aload 0
lload 2
putfield io.netty.channel.DefaultFileRegion.position:J
9: aload 0
lload 4
putfield io.netty.channel.DefaultFileRegion.count:J
10: aload 0
aconst_null
putfield io.netty.channel.DefaultFileRegion.f:Ljava/io/File;
11: return
end local 4 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Lio/netty/channel/DefaultFileRegion;
0 12 1 file Ljava/nio/channels/FileChannel;
0 12 2 position J
0 12 4 count J
MethodParameters:
Name Flags
file
position
count
public void <init>(java.io.File, long, long);
descriptor: (Ljava/io/File;JJ)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=6, args_size=4
start local 0 start local 1 start local 2 start local 4 0: aload 0
invokespecial io.netty.util.AbstractReferenceCounted.<init>:()V
1: aload 1
ifnonnull 3
2: new java.lang.NullPointerException
dup
ldc "f"
invokespecial java.lang.NullPointerException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals: io.netty.channel.DefaultFileRegion java.io.File long long
StackMap stack:
lload 2
lconst_0
lcmp
ifge 5
4: new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
ldc "position must be >= 0 but was "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
lload 2
invokevirtual java.lang.StringBuilder.append:(J)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
5: StackMap locals:
StackMap stack:
lload 4
lconst_0
lcmp
ifge 7
6: new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
ldc "count must be >= 0 but was "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
lload 4
invokevirtual java.lang.StringBuilder.append:(J)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
7: StackMap locals:
StackMap stack:
aload 0
lload 2
putfield io.netty.channel.DefaultFileRegion.position:J
8: aload 0
lload 4
putfield io.netty.channel.DefaultFileRegion.count:J
9: aload 0
aload 1
putfield io.netty.channel.DefaultFileRegion.f:Ljava/io/File;
10: return
end local 4 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lio/netty/channel/DefaultFileRegion;
0 11 1 f Ljava/io/File;
0 11 2 position J
0 11 4 count J
MethodParameters:
Name Flags
f
position
count
public boolean isOpen();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield io.netty.channel.DefaultFileRegion.file:Ljava/nio/channels/FileChannel;
ifnull 1
iconst_1
ireturn
StackMap locals:
StackMap stack:
1: iconst_0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lio/netty/channel/DefaultFileRegion;
public void open();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual io.netty.channel.DefaultFileRegion.isOpen:()Z
ifne 2
aload 0
invokevirtual io.netty.channel.DefaultFileRegion.refCnt:()I
ifle 2
1: aload 0
new java.io.RandomAccessFile
dup
aload 0
getfield io.netty.channel.DefaultFileRegion.f:Ljava/io/File;
ldc "r"
invokespecial java.io.RandomAccessFile.<init>:(Ljava/io/File;Ljava/lang/String;)V
invokevirtual java.io.RandomAccessFile.getChannel:()Ljava/nio/channels/FileChannel;
putfield io.netty.channel.DefaultFileRegion.file:Ljava/nio/channels/FileChannel;
2: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lio/netty/channel/DefaultFileRegion;
Exceptions:
throws java.io.IOException
public long position();
descriptor: ()J
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield io.netty.channel.DefaultFileRegion.position:J
lreturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lio/netty/channel/DefaultFileRegion;
public long count();
descriptor: ()J
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield io.netty.channel.DefaultFileRegion.count:J
lreturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lio/netty/channel/DefaultFileRegion;
public long transfered();
descriptor: ()J
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield io.netty.channel.DefaultFileRegion.transferred:J
lreturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lio/netty/channel/DefaultFileRegion;
RuntimeVisibleAnnotations:
java.lang.Deprecated()
public long transferred();
descriptor: ()J
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield io.netty.channel.DefaultFileRegion.transferred:J
lreturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lio/netty/channel/DefaultFileRegion;
public long transferTo(java.nio.channels.WritableByteChannel, long);
descriptor: (Ljava/nio/channels/WritableByteChannel;J)J
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=8, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getfield io.netty.channel.DefaultFileRegion.count:J
lload 2
lsub
lstore 4
start local 4 1: lload 4
lconst_0
lcmp
iflt 2
lload 2
lconst_0
lcmp
ifge 7
2: StackMap locals: long
StackMap stack:
new java.lang.IllegalArgumentException
dup
3: new java.lang.StringBuilder
dup
ldc "position out of range: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
lload 2
invokevirtual java.lang.StringBuilder.append:(J)Ljava/lang/StringBuilder;
4: ldc " (expected: 0 - "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 0
getfield io.netty.channel.DefaultFileRegion.count:J
lconst_1
lsub
invokevirtual java.lang.StringBuilder.append:(J)Ljava/lang/StringBuilder;
bipush 41
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
5: invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
6: invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
7: StackMap locals:
StackMap stack:
lload 4
lconst_0
lcmp
ifne 9
8: lconst_0
lreturn
9: StackMap locals:
StackMap stack:
aload 0
invokevirtual io.netty.channel.DefaultFileRegion.refCnt:()I
ifne 11
10: new io.netty.util.IllegalReferenceCountException
dup
iconst_0
invokespecial io.netty.util.IllegalReferenceCountException.<init>:(I)V
athrow
11: StackMap locals:
StackMap stack:
aload 0
invokevirtual io.netty.channel.DefaultFileRegion.open:()V
12: aload 0
getfield io.netty.channel.DefaultFileRegion.file:Ljava/nio/channels/FileChannel;
aload 0
getfield io.netty.channel.DefaultFileRegion.position:J
lload 2
ladd
lload 4
aload 1
invokevirtual java.nio.channels.FileChannel.transferTo:(JJLjava/nio/channels/WritableByteChannel;)J
lstore 6
start local 6 13: lload 6
lconst_0
lcmp
ifle 15
14: aload 0
dup
getfield io.netty.channel.DefaultFileRegion.transferred:J
lload 6
ladd
putfield io.netty.channel.DefaultFileRegion.transferred:J
15: StackMap locals: long
StackMap stack:
lload 6
lreturn
end local 6 end local 4 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 16 0 this Lio/netty/channel/DefaultFileRegion;
0 16 1 target Ljava/nio/channels/WritableByteChannel;
0 16 2 position J
1 16 4 count J
13 16 6 written J
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
target
position
protected void deallocate();
descriptor: ()V
flags: (0x0004) ACC_PROTECTED
Code:
stack=3, locals=3, args_size=1
start local 0 0: aload 0
getfield io.netty.channel.DefaultFileRegion.file:Ljava/nio/channels/FileChannel;
astore 1
start local 1 1: aload 1
ifnonnull 3
2: return
3: StackMap locals: java.nio.channels.FileChannel
StackMap stack:
aload 0
aconst_null
putfield io.netty.channel.DefaultFileRegion.file:Ljava/nio/channels/FileChannel;
4: aload 1
invokevirtual java.nio.channels.FileChannel.close:()V
5: goto 9
StackMap locals:
StackMap stack: java.io.IOException
6: astore 2
start local 2 7: getstatic io.netty.channel.DefaultFileRegion.logger:Lio/netty/util/internal/logging/InternalLogger;
invokeinterface io.netty.util.internal.logging.InternalLogger.isWarnEnabled:()Z
ifeq 9
8: getstatic io.netty.channel.DefaultFileRegion.logger:Lio/netty/util/internal/logging/InternalLogger;
ldc "Failed to close a file."
aload 2
invokeinterface io.netty.util.internal.logging.InternalLogger.warn:(Ljava/lang/String;Ljava/lang/Throwable;)V
end local 2 9: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lio/netty/channel/DefaultFileRegion;
1 10 1 file Ljava/nio/channels/FileChannel;
7 9 2 e Ljava/io/IOException;
Exception table:
from to target type
4 5 6 Class java.io.IOException
public io.netty.channel.FileRegion retain();
descriptor: ()Lio/netty/channel/FileRegion;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial io.netty.util.AbstractReferenceCounted.retain:()Lio/netty/util/ReferenceCounted;
pop
1: aload 0
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lio/netty/channel/DefaultFileRegion;
public io.netty.channel.FileRegion retain(int);
descriptor: (I)Lio/netty/channel/FileRegion;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
iload 1
invokespecial io.netty.util.AbstractReferenceCounted.retain:(I)Lio/netty/util/ReferenceCounted;
pop
1: aload 0
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lio/netty/channel/DefaultFileRegion;
0 2 1 increment I
MethodParameters:
Name Flags
increment
public io.netty.channel.FileRegion touch();
descriptor: ()Lio/netty/channel/FileRegion;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lio/netty/channel/DefaultFileRegion;
public io.netty.channel.FileRegion touch(java.lang.Object);
descriptor: (Ljava/lang/Object;)Lio/netty/channel/FileRegion;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=2, args_size=2
start local 0 start local 1 0: aload 0
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lio/netty/channel/DefaultFileRegion;
0 1 1 hint Ljava/lang/Object;
MethodParameters:
Name Flags
hint
public io.netty.util.ReferenceCounted retain(int);
descriptor: (I)Lio/netty/util/ReferenceCounted;
flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC
Code:
stack=2, locals=2, args_size=2
0: aload 0
iload 1
invokevirtual io.netty.channel.DefaultFileRegion.retain:(I)Lio/netty/channel/FileRegion;
areturn
LocalVariableTable:
Start End Slot Name Signature
public io.netty.util.ReferenceCounted retain();
descriptor: ()Lio/netty/util/ReferenceCounted;
flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC
Code:
stack=1, locals=1, args_size=1
0: aload 0
invokevirtual io.netty.channel.DefaultFileRegion.retain:()Lio/netty/channel/FileRegion;
areturn
LocalVariableTable:
Start End Slot Name Signature
public io.netty.util.ReferenceCounted touch(java.lang.Object);
descriptor: (Ljava/lang/Object;)Lio/netty/util/ReferenceCounted;
flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC
Code:
stack=2, locals=2, args_size=2
0: aload 0
aload 1
invokevirtual io.netty.channel.DefaultFileRegion.touch:(Ljava/lang/Object;)Lio/netty/channel/FileRegion;
areturn
LocalVariableTable:
Start End Slot Name Signature
public io.netty.util.ReferenceCounted touch();
descriptor: ()Lio/netty/util/ReferenceCounted;
flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC
Code:
stack=1, locals=1, args_size=1
0: aload 0
invokevirtual io.netty.channel.DefaultFileRegion.touch:()Lio/netty/channel/FileRegion;
areturn
LocalVariableTable:
Start End Slot Name Signature
}
SourceFile: "DefaultFileRegion.java"