class jdk.incubator.http.ResponseSubscribers$ByteArraySubscriber<T> implements jdk.incubator.http.HttpResponse$BodySubscriber<T>
minor version: 0
major version: 59
flags: flags: (0x0020) ACC_SUPER
this_class: jdk.incubator.http.ResponseSubscribers$ByteArraySubscriber
super_class: java.lang.Object
{
private final java.util.function.Function<byte[], T> finisher;
descriptor: Ljava/util/function/Function;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/function/Function<[BTT;>;
private final java.util.concurrent.CompletableFuture<T> result;
descriptor: Ljava/util/concurrent/CompletableFuture;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/concurrent/CompletableFuture<TT;>;
private final java.util.List<java.nio.ByteBuffer> received;
descriptor: Ljava/util/List;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/List<Ljava/nio/ByteBuffer;>;
private volatile java.util.concurrent.Flow$Subscription subscription;
descriptor: Ljava/util/concurrent/Flow$Subscription;
flags: (0x0042) ACC_PRIVATE, ACC_VOLATILE
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/incubator/http/ResponseSubscribers;
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.incubator.http.ResponseSubscribers$ByteArraySubscriber.$assertionsDisabled:Z
return
LocalVariableTable:
Start End Slot Name Signature
void <init>(java.util.function.Function<byte[], T>);
descriptor: (Ljava/util/function/Function;)V
flags: (0x0000)
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new jdk.incubator.http.internal.common.MinimalFuture
dup
invokespecial jdk.incubator.http.internal.common.MinimalFuture.<init>:()V
putfield jdk.incubator.http.ResponseSubscribers$ByteArraySubscriber.result:Ljava/util/concurrent/CompletableFuture;
2: aload 0
new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
putfield jdk.incubator.http.ResponseSubscribers$ByteArraySubscriber.received:Ljava/util/List;
3: aload 0
aload 1
putfield jdk.incubator.http.ResponseSubscribers$ByteArraySubscriber.finisher:Ljava/util/function/Function;
4: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Ljdk/incubator/http/ResponseSubscribers$ByteArraySubscriber<TT;>;
0 5 1 finisher Ljava/util/function/Function<[BTT;>;
Signature: (Ljava/util/function/Function<[BTT;>;)V
MethodParameters:
Name Flags
finisher
public void onSubscribe(java.util.concurrent.Flow$Subscription);
descriptor: (Ljava/util/concurrent/Flow$Subscription;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield jdk.incubator.http.ResponseSubscribers$ByteArraySubscriber.subscription:Ljava/util/concurrent/Flow$Subscription;
ifnull 3
1: aload 1
invokeinterface java.util.concurrent.Flow$Subscription.cancel:()V
2: return
3: StackMap locals:
StackMap stack:
aload 0
aload 1
putfield jdk.incubator.http.ResponseSubscribers$ByteArraySubscriber.subscription:Ljava/util/concurrent/Flow$Subscription;
4: aload 1
ldc 9223372036854775807
invokeinterface java.util.concurrent.Flow$Subscription.request:(J)V
5: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Ljdk/incubator/http/ResponseSubscribers$ByteArraySubscriber<TT;>;
0 6 1 subscription Ljava/util/concurrent/Flow$Subscription;
MethodParameters:
Name Flags
subscription
public void onNext(java.util.List<java.nio.ByteBuffer>);
descriptor: (Ljava/util/List;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: getstatic jdk.incubator.http.ResponseSubscribers$ByteArraySubscriber.$assertionsDisabled:Z
ifne 1
aload 1
invokestatic jdk.incubator.http.internal.common.Utils.hasRemaining:(Ljava/util/List;)Z
ifne 1
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
1: StackMap locals:
StackMap stack:
aload 0
getfield jdk.incubator.http.ResponseSubscribers$ByteArraySubscriber.received:Ljava/util/List;
aload 1
invokestatic jdk.incubator.http.internal.common.Utils.accumulateBuffers:(Ljava/util/List;Ljava/util/List;)J
pop2
2: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Ljdk/incubator/http/ResponseSubscribers$ByteArraySubscriber<TT;>;
0 3 1 items Ljava/util/List<Ljava/nio/ByteBuffer;>;
Signature: (Ljava/util/List<Ljava/nio/ByteBuffer;>;)V
MethodParameters:
Name Flags
items
public void onError(java.lang.Throwable);
descriptor: (Ljava/lang/Throwable;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield jdk.incubator.http.ResponseSubscribers$ByteArraySubscriber.received:Ljava/util/List;
invokeinterface java.util.List.clear:()V
1: aload 0
getfield jdk.incubator.http.ResponseSubscribers$ByteArraySubscriber.result:Ljava/util/concurrent/CompletableFuture;
aload 1
invokevirtual java.util.concurrent.CompletableFuture.completeExceptionally:(Ljava/lang/Throwable;)Z
pop
2: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Ljdk/incubator/http/ResponseSubscribers$ByteArraySubscriber<TT;>;
0 3 1 throwable Ljava/lang/Throwable;
MethodParameters:
Name Flags
throwable
private static byte[] join(java.util.List<java.nio.ByteBuffer>);
descriptor: (Ljava/util/List;)[B
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=4, locals=7, args_size=1
start local 0 0: aload 0
ldc 2147483647
invokestatic jdk.incubator.http.internal.common.Utils.remaining:(Ljava/util/List;I)I
istore 1
start local 1 1: iload 1
newarray 8
astore 2
start local 2 2: iconst_0
istore 3
start local 3 3: aload 0
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 5
goto 8
StackMap locals: java.util.List int byte[] int top java.util.Iterator
StackMap stack:
4: aload 5
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.nio.ByteBuffer
astore 4
start local 4 5: aload 4
invokevirtual java.nio.ByteBuffer.remaining:()I
istore 6
start local 6 6: aload 4
aload 2
iload 3
iload 6
invokevirtual java.nio.ByteBuffer.get:([BII)Ljava/nio/ByteBuffer;
pop
7: iload 3
iload 6
iadd
istore 3
end local 6 end local 4 8: StackMap locals:
StackMap stack:
aload 5
invokeinterface java.util.Iterator.hasNext:()Z
ifne 4
9: aload 2
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 bytes Ljava/util/List<Ljava/nio/ByteBuffer;>;
1 10 1 size I
2 10 2 res [B
3 10 3 from I
5 8 4 b Ljava/nio/ByteBuffer;
6 8 6 l I
Signature: (Ljava/util/List<Ljava/nio/ByteBuffer;>;)[B
MethodParameters:
Name Flags
bytes
public void onComplete();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=1
start local 0 0: aload 0
getfield jdk.incubator.http.ResponseSubscribers$ByteArraySubscriber.result:Ljava/util/concurrent/CompletableFuture;
aload 0
getfield jdk.incubator.http.ResponseSubscribers$ByteArraySubscriber.finisher:Ljava/util/function/Function;
aload 0
getfield jdk.incubator.http.ResponseSubscribers$ByteArraySubscriber.received:Ljava/util/List;
invokestatic jdk.incubator.http.ResponseSubscribers$ByteArraySubscriber.join:(Ljava/util/List;)[B
invokeinterface java.util.function.Function.apply:(Ljava/lang/Object;)Ljava/lang/Object;
invokevirtual java.util.concurrent.CompletableFuture.complete:(Ljava/lang/Object;)Z
pop
1: aload 0
getfield jdk.incubator.http.ResponseSubscribers$ByteArraySubscriber.received:Ljava/util/List;
invokeinterface java.util.List.clear:()V
2: goto 5
StackMap locals:
StackMap stack: java.lang.IllegalArgumentException
3: astore 1
start local 1 4: aload 0
getfield jdk.incubator.http.ResponseSubscribers$ByteArraySubscriber.result:Ljava/util/concurrent/CompletableFuture;
aload 1
invokevirtual java.util.concurrent.CompletableFuture.completeExceptionally:(Ljava/lang/Throwable;)Z
pop
end local 1 5: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Ljdk/incubator/http/ResponseSubscribers$ByteArraySubscriber<TT;>;
4 5 1 e Ljava/lang/IllegalArgumentException;
Exception table:
from to target type
0 2 3 Class java.lang.IllegalArgumentException
public java.util.concurrent.CompletionStage<T> getBody();
descriptor: ()Ljava/util/concurrent/CompletionStage;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield jdk.incubator.http.ResponseSubscribers$ByteArraySubscriber.result:Ljava/util/concurrent/CompletableFuture;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/incubator/http/ResponseSubscribers$ByteArraySubscriber<TT;>;
Signature: ()Ljava/util/concurrent/CompletionStage<TT;>;
public void onNext(java.lang.Object);
descriptor: (Ljava/lang/Object;)V
flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC
Code:
stack=2, locals=2, args_size=2
0: aload 0
aload 1
checkcast java.util.List
invokevirtual jdk.incubator.http.ResponseSubscribers$ByteArraySubscriber.onNext:(Ljava/util/List;)V
return
LocalVariableTable:
Start End Slot Name Signature
}
Signature: <T:Ljava/lang/Object;>Ljava/lang/Object;Ljdk/incubator/http/HttpResponse$BodySubscriber<TT;>;
SourceFile: "ResponseSubscribers.java"
NestHost: jdk.incubator.http.ResponseSubscribers
InnerClasses:
public abstract Subscription = java.util.concurrent.Flow$Subscription of java.util.concurrent.Flow
public abstract BodySubscriber = jdk.incubator.http.HttpResponse$BodySubscriber of jdk.incubator.http.HttpResponse
ByteArraySubscriber = jdk.incubator.http.ResponseSubscribers$ByteArraySubscriber of jdk.incubator.http.ResponseSubscribers