com.groupbyinc.flux.common.netty.buffer.UnpooledDirectByteBuf.class Maven / Gradle / Ivy
???? 2? =com/groupbyinc/flux/common/netty/buffer/UnpooledDirectByteBuf Gcom/groupbyinc/flux/common/netty/buffer/AbstractReferenceCountedByteBuf UnpooledDirectByteBuf.java alloc :Lcom/groupbyinc/flux/common/netty/buffer/ByteBufAllocator; buffer Ljava/nio/ByteBuffer; tmpNioBuf capacity I doNotFree Z ?(Lcom/groupbyinc/flux/common/netty/buffer/ByteBufAllocator;II)V (I)V
java/lang/NullPointerException (Ljava/lang/String;)V
8com/groupbyinc/flux/common/netty/buffer/ByteBufAllocator "java/lang/IllegalArgumentException java/lang/StringBuilder ()V
! initialCapacity: # append -(Ljava/lang/String;)Ljava/lang/StringBuilder; % &
' (I)Ljava/lang/StringBuilder; % )
* toString ()Ljava/lang/String; , -
.
maxCapacity: 1 %initialCapacity(%d) > maxCapacity(%d) 3 java/lang/Object 5 java/lang/Integer 7 valueOf (I)Ljava/lang/Integer; 9 :
8 ; java/lang/String = format 9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; ? @
> A C java/nio/ByteBuffer E allocateDirect (I)Ljava/nio/ByteBuffer; G H
F I
setByteBuffer (Ljava/nio/ByteBuffer;)V K L
M this ?Lcom/groupbyinc/flux/common/netty/buffer/UnpooledDirectByteBuf; initialCapacity maxCapacity S(Lcom/groupbyinc/flux/common/netty/buffer/ByteBufAllocator;Ljava/nio/ByteBuffer;I)V
initialBuffer T isDirect ()Z V W
F X %initialBuffer is not a direct buffer. Z
isReadOnly \ W
F ] $initialBuffer is a read-only buffer. _ remaining ()I a b
F c
e slice ()Ljava/nio/ByteBuffer; g h
F i java/nio/ByteOrder k
BIG_ENDIAN Ljava/nio/ByteOrder; m n l o order +(Ljava/nio/ByteOrder;)Ljava/nio/ByteBuffer; q r
F s writerIndex 4(I)Lcom/groupbyinc/flux/common/netty/buffer/ByteBuf; u v
w
freeDirect @com/groupbyinc/flux/common/netty/util/internal/PlatformDependent z freeDirectBuffer | L
{ } y L
?
? ? oldBuffer checkNewCapacity ?
? readerIndex ? b
? u b
?
I position (I)Ljava/nio/Buffer; ? ?
F ? b
F ? java/nio/Buffer ? limit ? ?
? ? put ,(Ljava/nio/ByteBuffer;)Ljava/nio/ByteBuffer; ? ?
F ? clear ()Ljava/nio/Buffer; ? ?
F ? setIndex 5(II)Lcom/groupbyinc/flux/common/netty/buffer/ByteBuf; ? ?
? newBuffer newCapacity oldCapacity <()Lcom/groupbyinc/flux/common/netty/buffer/ByteBufAllocator; ()Ljava/nio/ByteOrder; hasArray array ()[B 'java/lang/UnsupportedOperationException ?
direct buffer ?
? arrayOffset hasMemoryAddress
memoryAddress ()J
? ! getByte (I)B ensureAccessible ?
? _getByte ? ?
? index get ? ?
F ? getShort (I)S _getShort ? ?
? ? ?
F ? _getShortLE 3com/groupbyinc/flux/common/netty/buffer/ByteBufUtil ? swapShort (S)S ? ?
? ? getUnsignedMedium (I)I _getUnsignedMedium ? ?
? ? ?
? _getUnsignedMediumLE getInt _getInt ? ?
? ? ?
F ? _getIntLE swapInt ? ?
? ? getLong (I)J _getLong ? ?
? ? ?
F ?
_getLongLE swapLong (J)J ? ?
? ? getBytes g(ILcom/groupbyinc/flux/common/netty/buffer/ByteBuf;II)Lcom/groupbyinc/flux/common/netty/buffer/ByteBuf; /com/groupbyinc/flux/common/netty/buffer/ByteBuf ?
? ?
checkDstIndex (IIII)V ? ?
? ? W
? ? ? ?
? ? ? b
? ? 8(I[BII)Lcom/groupbyinc/flux/common/netty/buffer/ByteBuf; ?
nioBufferCount b
?
nioBuffers (II)[Ljava/nio/ByteBuffer;
? [Ljava/nio/ByteBuffer; I(ILjava/nio/ByteBuffer;)Lcom/groupbyinc/flux/common/netty/buffer/ByteBuf; ?
setBytes ?
? bbLen bb dst 1Lcom/groupbyinc/flux/common/netty/buffer/ByteBuf; dstIndex length (I[BIIZ)V ?
[B internalNioBuffer h
duplicate h
F!
? ? ([BII)Ljava/nio/ByteBuffer; ?$
F% tmpBuf internal readBytes 7([BII)Lcom/groupbyinc/flux/common/netty/buffer/ByteBuf; checkReadableBytes+
, ? . (ILjava/nio/ByteBuffer;Z)V ?0
1
checkIndex (II)V34
5 H(Ljava/nio/ByteBuffer;)Lcom/groupbyinc/flux/common/netty/buffer/ByteBuf; setByte _setByte94
: value (IB)Ljava/nio/ByteBuffer; ?=
F> setShort _setShortA4
B putShort (IS)Ljava/nio/ByteBuffer;DE
FF _setShortLE setMedium
_setMediumJ4
K8 ?
M _setMediumLE setInt _setIntQ4
R putInt (II)Ljava/nio/ByteBuffer;TU
FV _setIntLE setLong 5(IJ)Lcom/groupbyinc/flux/common/netty/buffer/ByteBuf; _setLong (IJ)V[\
] J putLong (IJ)Ljava/nio/ByteBuffer;`a
Fb
_setLongLE
checkSrcIndexe ?
f
h ? ?
?j src srcIndex ?$
Fn K(ILjava/io/OutputStream;I)Lcom/groupbyinc/flux/common/netty/buffer/ByteBuf; java/io/IOExceptionq (ILjava/io/OutputStream;IZ)V ?s
t out Ljava/io/OutputStream;
F ?
F ?
F ? java/io/OutputStream{ write ([BII)V}~
| ([B)Ljava/nio/ByteBuffer; ??
F? ([B)V}?
|? tmp J(Ljava/io/OutputStream;I)Lcom/groupbyinc/flux/common/netty/buffer/ByteBuf; -(ILjava/nio/channels/GatheringByteChannel;I)I .(ILjava/nio/channels/GatheringByteChannel;IZ)I ??
? (Ljava/nio/channels/GatheringByteChannel; &java/nio/channels/GatheringByteChannel? (Ljava/nio/ByteBuffer;)I}??? %(ILjava/nio/channels/FileChannel;JI)I &(ILjava/nio/channels/FileChannel;JIZ)I ??
? Ljava/nio/channels/FileChannel; java/nio/channels/FileChannel? (Ljava/nio/ByteBuffer;J)I}?
?? ,(Ljava/nio/channels/GatheringByteChannel;I)I $(Ljava/nio/channels/FileChannel;JI)I (ILjava/io/InputStream;I)I java/io/InputStream? read ([BII)I??
?? ([B)I??
?? in Ljava/io/InputStream; .(ILjava/nio/channels/ScatteringByteChannel;I)I (java/nio/channels/ClosedChannelException? 'java/nio/channels/ScatteringByteChannel????? ignored *Ljava/nio/channels/ClosedChannelException; )Ljava/nio/channels/ScatteringByteChannel;??
?? nioBuffer?U
? copy #java/lang/IndexOutOfBoundsException? Too many bytes to read - Need ?
? ?
? R b
? directBuffer? ? ?
writeBytes?7
?? $Ljava/lang/IllegalArgumentException;
deallocate unwrap 3()Lcom/groupbyinc/flux/common/netty/buffer/ByteBuf; Code LocalVariableTable LineNumberTable
StackMapTable
Exceptions
SourceFile !
I ? ?*? +?
? Y? ?? ? Y? Y? "$? (? +? /? 0?? ? Y? Y? "2? (? +? /? 0?? "? Y4? 6Y?