public class jdk.nio.zipfs.ByteArrayChannel implements java.nio.channels.SeekableByteChannel
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: jdk.nio.zipfs.ByteArrayChannel
super_class: java.lang.Object
{
private final java.util.concurrent.locks.ReadWriteLock rwlock;
descriptor: Ljava/util/concurrent/locks/ReadWriteLock;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private byte[] buf;
descriptor: [B
flags: (0x0002) ACC_PRIVATE
private int pos;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private int last;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private boolean closed;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
private boolean readonly;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
private static final int MAX_ARRAY_SIZE;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 2147483639
void <init>(int, boolean);
descriptor: (IZ)V
flags: (0x0000)
Code:
stack=4, 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
new java.util.concurrent.locks.ReentrantReadWriteLock
dup
invokespecial java.util.concurrent.locks.ReentrantReadWriteLock.<init>:()V
putfield jdk.nio.zipfs.ByteArrayChannel.rwlock:Ljava/util/concurrent/locks/ReadWriteLock;
2: aload 0
iload 1
newarray 8
putfield jdk.nio.zipfs.ByteArrayChannel.buf:[B
3: aload 0
aload 0
iconst_0
dup_x1
putfield jdk.nio.zipfs.ByteArrayChannel.last:I
putfield jdk.nio.zipfs.ByteArrayChannel.pos:I
4: aload 0
iload 2
putfield jdk.nio.zipfs.ByteArrayChannel.readonly:Z
5: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Ljdk/nio/zipfs/ByteArrayChannel;
0 6 1 sz I
0 6 2 readonly Z
MethodParameters:
Name Flags
sz
readonly
void <init>(byte[], boolean);
descriptor: ([BZ)V
flags: (0x0000)
Code:
stack=3, 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
new java.util.concurrent.locks.ReentrantReadWriteLock
dup
invokespecial java.util.concurrent.locks.ReentrantReadWriteLock.<init>:()V
putfield jdk.nio.zipfs.ByteArrayChannel.rwlock:Ljava/util/concurrent/locks/ReadWriteLock;
2: aload 0
aload 1
putfield jdk.nio.zipfs.ByteArrayChannel.buf:[B
3: aload 0
iconst_0
putfield jdk.nio.zipfs.ByteArrayChannel.pos:I
4: aload 0
aload 1
arraylength
putfield jdk.nio.zipfs.ByteArrayChannel.last:I
5: aload 0
iload 2
putfield jdk.nio.zipfs.ByteArrayChannel.readonly:Z
6: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Ljdk/nio/zipfs/ByteArrayChannel;
0 7 1 buf [B
0 7 2 readonly Z
MethodParameters:
Name Flags
buf
readonly
public boolean isOpen();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield jdk.nio.zipfs.ByteArrayChannel.closed:Z
ifeq 1
iconst_0
goto 2
StackMap locals:
StackMap stack:
1: iconst_1
StackMap locals:
StackMap stack: int
2: ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Ljdk/nio/zipfs/ByteArrayChannel;
public long position();
descriptor: ()J
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=4, args_size=1
start local 0 0: aload 0
invokevirtual jdk.nio.zipfs.ByteArrayChannel.beginRead:()V
1: aload 0
invokevirtual jdk.nio.zipfs.ByteArrayChannel.ensureOpen:()V
2: aload 0
getfield jdk.nio.zipfs.ByteArrayChannel.pos:I
i2l
lstore 2
3: aload 0
invokevirtual jdk.nio.zipfs.ByteArrayChannel.endRead:()V
4: lload 2
lreturn
5: StackMap locals:
StackMap stack: java.lang.Throwable
astore 1
6: aload 0
invokevirtual jdk.nio.zipfs.ByteArrayChannel.endRead:()V
7: aload 1
athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Ljdk/nio/zipfs/ByteArrayChannel;
Exception table:
from to target type
1 3 5 any
Exceptions:
throws java.io.IOException
public java.nio.channels.SeekableByteChannel position(long);
descriptor: (J)Ljava/nio/channels/SeekableByteChannel;
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=5, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual jdk.nio.zipfs.ByteArrayChannel.beginWrite:()V
1: aload 0
invokevirtual jdk.nio.zipfs.ByteArrayChannel.ensureOpen:()V
2: lload 1
lconst_0
lcmp
iflt 3
lload 1
ldc 2147483647
lcmp
iflt 4
3: StackMap locals:
StackMap stack:
new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
ldc "Illegal position "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
lload 1
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
4: StackMap locals:
StackMap stack:
aload 0
lload 1
l2i
aload 0
getfield jdk.nio.zipfs.ByteArrayChannel.last:I
invokestatic java.lang.Math.min:(II)I
putfield jdk.nio.zipfs.ByteArrayChannel.pos:I
5: aload 0
astore 4
6: aload 0
invokevirtual jdk.nio.zipfs.ByteArrayChannel.endWrite:()V
7: aload 4
areturn
8: StackMap locals:
StackMap stack: java.lang.Throwable
astore 3
9: aload 0
invokevirtual jdk.nio.zipfs.ByteArrayChannel.endWrite:()V
10: aload 3
athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Ljdk/nio/zipfs/ByteArrayChannel;
0 11 1 pos J
Exception table:
from to target type
1 6 8 any
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
pos
public int read(java.nio.ByteBuffer);
descriptor: (Ljava/nio/ByteBuffer;)I
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=5, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual jdk.nio.zipfs.ByteArrayChannel.beginWrite:()V
1: aload 0
invokevirtual jdk.nio.zipfs.ByteArrayChannel.ensureOpen:()V
2: aload 0
getfield jdk.nio.zipfs.ByteArrayChannel.pos:I
aload 0
getfield jdk.nio.zipfs.ByteArrayChannel.last:I
if_icmpne 5
3: aload 0
invokevirtual jdk.nio.zipfs.ByteArrayChannel.endWrite:()V
4: iconst_m1
ireturn
5: StackMap locals:
StackMap stack:
aload 1
invokevirtual java.nio.ByteBuffer.remaining:()I
aload 0
getfield jdk.nio.zipfs.ByteArrayChannel.last:I
aload 0
getfield jdk.nio.zipfs.ByteArrayChannel.pos:I
isub
invokestatic java.lang.Math.min:(II)I
istore 2
start local 2 6: aload 1
aload 0
getfield jdk.nio.zipfs.ByteArrayChannel.buf:[B
aload 0
getfield jdk.nio.zipfs.ByteArrayChannel.pos:I
iload 2
invokevirtual java.nio.ByteBuffer.put:([BII)Ljava/nio/ByteBuffer;
pop
7: aload 0
dup
getfield jdk.nio.zipfs.ByteArrayChannel.pos:I
iload 2
iadd
putfield jdk.nio.zipfs.ByteArrayChannel.pos:I
8: iload 2
istore 4
9: aload 0
invokevirtual jdk.nio.zipfs.ByteArrayChannel.endWrite:()V
10: iload 4
ireturn
end local 2 11: StackMap locals:
StackMap stack: java.lang.Throwable
astore 3
12: aload 0
invokevirtual jdk.nio.zipfs.ByteArrayChannel.endWrite:()V
13: aload 3
athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 14 0 this Ljdk/nio/zipfs/ByteArrayChannel;
0 14 1 dst Ljava/nio/ByteBuffer;
6 11 2 n I
Exception table:
from to target type
1 3 11 any
5 9 11 any
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
dst
public java.nio.channels.SeekableByteChannel truncate(long);
descriptor: (J)Ljava/nio/channels/SeekableByteChannel;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=3, args_size=2
start local 0 start local 1 0: aload 0
getfield jdk.nio.zipfs.ByteArrayChannel.readonly:Z
ifeq 2
1: new java.nio.channels.NonWritableChannelException
dup
invokespecial java.nio.channels.NonWritableChannelException.<init>:()V
athrow
2: StackMap locals:
StackMap stack:
aload 0
invokevirtual jdk.nio.zipfs.ByteArrayChannel.ensureOpen:()V
3: new java.lang.UnsupportedOperationException
dup
invokespecial java.lang.UnsupportedOperationException.<init>:()V
athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Ljdk/nio/zipfs/ByteArrayChannel;
0 4 1 size J
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
size
public int write(java.nio.ByteBuffer);
descriptor: (Ljava/nio/ByteBuffer;)I
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=5, args_size=2
start local 0 start local 1 0: aload 0
getfield jdk.nio.zipfs.ByteArrayChannel.readonly:Z
ifeq 2
1: new java.nio.channels.NonWritableChannelException
dup
invokespecial java.nio.channels.NonWritableChannelException.<init>:()V
athrow
2: StackMap locals:
StackMap stack:
aload 0
invokevirtual jdk.nio.zipfs.ByteArrayChannel.beginWrite:()V
3: aload 0
invokevirtual jdk.nio.zipfs.ByteArrayChannel.ensureOpen:()V
4: aload 1
invokevirtual java.nio.ByteBuffer.remaining:()I
istore 2
start local 2 5: aload 0
aload 0
getfield jdk.nio.zipfs.ByteArrayChannel.pos:I
iload 2
iadd
invokevirtual jdk.nio.zipfs.ByteArrayChannel.ensureCapacity:(I)V
6: aload 1
aload 0
getfield jdk.nio.zipfs.ByteArrayChannel.buf:[B
aload 0
getfield jdk.nio.zipfs.ByteArrayChannel.pos:I
iload 2
invokevirtual java.nio.ByteBuffer.get:([BII)Ljava/nio/ByteBuffer;
pop
7: aload 0
dup
getfield jdk.nio.zipfs.ByteArrayChannel.pos:I
iload 2
iadd
putfield jdk.nio.zipfs.ByteArrayChannel.pos:I
8: aload 0
getfield jdk.nio.zipfs.ByteArrayChannel.pos:I
aload 0
getfield jdk.nio.zipfs.ByteArrayChannel.last:I
if_icmple 10
9: aload 0
aload 0
getfield jdk.nio.zipfs.ByteArrayChannel.pos:I
putfield jdk.nio.zipfs.ByteArrayChannel.last:I
10: StackMap locals: int
StackMap stack:
iload 2
istore 4
11: aload 0
invokevirtual jdk.nio.zipfs.ByteArrayChannel.endWrite:()V
12: iload 4
ireturn
end local 2 13: StackMap locals: jdk.nio.zipfs.ByteArrayChannel java.nio.ByteBuffer
StackMap stack: java.lang.Throwable
astore 3
14: aload 0
invokevirtual jdk.nio.zipfs.ByteArrayChannel.endWrite:()V
15: aload 3
athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 16 0 this Ljdk/nio/zipfs/ByteArrayChannel;
0 16 1 src Ljava/nio/ByteBuffer;
5 13 2 n I
Exception table:
from to target type
3 11 13 any
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
src
public long size();
descriptor: ()J
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=4, args_size=1
start local 0 0: aload 0
invokevirtual jdk.nio.zipfs.ByteArrayChannel.beginRead:()V
1: aload 0
invokevirtual jdk.nio.zipfs.ByteArrayChannel.ensureOpen:()V
2: aload 0
getfield jdk.nio.zipfs.ByteArrayChannel.last:I
i2l
lstore 2
3: aload 0
invokevirtual jdk.nio.zipfs.ByteArrayChannel.endRead:()V
4: lload 2
lreturn
5: StackMap locals:
StackMap stack: java.lang.Throwable
astore 1
6: aload 0
invokevirtual jdk.nio.zipfs.ByteArrayChannel.endRead:()V
7: aload 1
athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Ljdk/nio/zipfs/ByteArrayChannel;
Exception table:
from to target type
1 3 5 any
Exceptions:
throws java.io.IOException
public void close();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=1
start local 0 0: aload 0
getfield jdk.nio.zipfs.ByteArrayChannel.closed:Z
ifeq 2
1: return
2: StackMap locals:
StackMap stack:
aload 0
invokevirtual jdk.nio.zipfs.ByteArrayChannel.beginWrite:()V
3: aload 0
iconst_1
putfield jdk.nio.zipfs.ByteArrayChannel.closed:Z
4: aload 0
aconst_null
putfield jdk.nio.zipfs.ByteArrayChannel.buf:[B
5: aload 0
iconst_0
putfield jdk.nio.zipfs.ByteArrayChannel.pos:I
6: aload 0
iconst_0
putfield jdk.nio.zipfs.ByteArrayChannel.last:I
7: goto 11
StackMap locals:
StackMap stack: java.lang.Throwable
8: astore 1
9: aload 0
invokevirtual jdk.nio.zipfs.ByteArrayChannel.endWrite:()V
10: aload 1
athrow
11: StackMap locals:
StackMap stack:
aload 0
invokevirtual jdk.nio.zipfs.ByteArrayChannel.endWrite:()V
12: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 this Ljdk/nio/zipfs/ByteArrayChannel;
Exception table:
from to target type
3 8 8 any
Exceptions:
throws java.io.IOException
public byte[] toByteArray();
descriptor: ()[B
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=3, args_size=1
start local 0 0: aload 0
invokevirtual jdk.nio.zipfs.ByteArrayChannel.beginRead:()V
1: aload 0
getfield jdk.nio.zipfs.ByteArrayChannel.buf:[B
aload 0
getfield jdk.nio.zipfs.ByteArrayChannel.last:I
invokestatic java.util.Arrays.copyOf:([BI)[B
astore 2
2: aload 0
invokevirtual jdk.nio.zipfs.ByteArrayChannel.endRead:()V
3: aload 2
areturn
4: StackMap locals:
StackMap stack: java.lang.Throwable
astore 1
5: aload 0
invokevirtual jdk.nio.zipfs.ByteArrayChannel.endRead:()V
6: aload 1
athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Ljdk/nio/zipfs/ByteArrayChannel;
Exception table:
from to target type
1 2 4 any
private void ensureOpen();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield jdk.nio.zipfs.ByteArrayChannel.closed:Z
ifeq 2
1: new java.nio.channels.ClosedChannelException
dup
invokespecial java.nio.channels.ClosedChannelException.<init>:()V
athrow
2: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Ljdk/nio/zipfs/ByteArrayChannel;
Exceptions:
throws java.io.IOException
final void beginWrite();
descriptor: ()V
flags: (0x0010) ACC_FINAL
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield jdk.nio.zipfs.ByteArrayChannel.rwlock:Ljava/util/concurrent/locks/ReadWriteLock;
invokeinterface java.util.concurrent.locks.ReadWriteLock.writeLock:()Ljava/util/concurrent/locks/Lock;
invokeinterface java.util.concurrent.locks.Lock.lock:()V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljdk/nio/zipfs/ByteArrayChannel;
final void endWrite();
descriptor: ()V
flags: (0x0010) ACC_FINAL
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield jdk.nio.zipfs.ByteArrayChannel.rwlock:Ljava/util/concurrent/locks/ReadWriteLock;
invokeinterface java.util.concurrent.locks.ReadWriteLock.writeLock:()Ljava/util/concurrent/locks/Lock;
invokeinterface java.util.concurrent.locks.Lock.unlock:()V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljdk/nio/zipfs/ByteArrayChannel;
private final void beginRead();
descriptor: ()V
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield jdk.nio.zipfs.ByteArrayChannel.rwlock:Ljava/util/concurrent/locks/ReadWriteLock;
invokeinterface java.util.concurrent.locks.ReadWriteLock.readLock:()Ljava/util/concurrent/locks/Lock;
invokeinterface java.util.concurrent.locks.Lock.lock:()V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljdk/nio/zipfs/ByteArrayChannel;
private final void endRead();
descriptor: ()V
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield jdk.nio.zipfs.ByteArrayChannel.rwlock:Ljava/util/concurrent/locks/ReadWriteLock;
invokeinterface java.util.concurrent.locks.ReadWriteLock.readLock:()Ljava/util/concurrent/locks/Lock;
invokeinterface java.util.concurrent.locks.Lock.unlock:()V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljdk/nio/zipfs/ByteArrayChannel;
private void ensureCapacity(int);
descriptor: (I)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: iload 1
aload 0
getfield jdk.nio.zipfs.ByteArrayChannel.buf:[B
arraylength
isub
ifle 2
1: aload 0
iload 1
invokevirtual jdk.nio.zipfs.ByteArrayChannel.grow:(I)V
2: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Ljdk/nio/zipfs/ByteArrayChannel;
0 3 1 minCapacity I
MethodParameters:
Name Flags
minCapacity
private void grow(int);
descriptor: (I)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=4, args_size=2
start local 0 start local 1 0: aload 0
getfield jdk.nio.zipfs.ByteArrayChannel.buf:[B
arraylength
istore 2
start local 2 1: iload 2
iconst_1
ishl
istore 3
start local 3 2: iload 3
iload 1
isub
ifge 4
3: iload 1
istore 3
4: StackMap locals: int int
StackMap stack:
iload 3
ldc 2147483639
isub
ifle 6
5: iload 1
invokestatic jdk.nio.zipfs.ByteArrayChannel.hugeCapacity:(I)I
istore 3
6: StackMap locals:
StackMap stack:
aload 0
aload 0
getfield jdk.nio.zipfs.ByteArrayChannel.buf:[B
iload 3
invokestatic java.util.Arrays.copyOf:([BI)[B
putfield jdk.nio.zipfs.ByteArrayChannel.buf:[B
7: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Ljdk/nio/zipfs/ByteArrayChannel;
0 8 1 minCapacity I
1 8 2 oldCapacity I
2 8 3 newCapacity I
MethodParameters:
Name Flags
minCapacity
private static int hugeCapacity(int);
descriptor: (I)I
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: iload 0
ifge 2
1: new java.lang.OutOfMemoryError
dup
ldc "Required length exceeds implementation limit"
invokespecial java.lang.OutOfMemoryError.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
iload 0
ldc 2147483639
if_icmple 4
3: ldc 2147483647
goto 5
4: StackMap locals:
StackMap stack:
ldc 2147483639
5: StackMap locals:
StackMap stack: int
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 minCapacity I
MethodParameters:
Name Flags
minCapacity
}
SourceFile: "ByteArrayChannel.java"