
com.groupbyinc.flux.common.bytes.PagedBytesReference.class Maven / Gradle / Ivy
???? 3 4com/groupbyinc/flux/common/bytes/PagedBytesReference java/lang/Object /com/groupbyinc/flux/common/bytes/BytesReference PagedBytesReference.java Scom/groupbyinc/flux/common/bytes/PagedBytesReference$PagedBytesReferenceStreamInput PagedBytesReferenceStreamInput 6com/groupbyinc/flux/common/bytes/BytesReference$Helper Helper PAGE_SIZE I @ bigarrays +Lcom/groupbyinc/flux/common/util/BigArrays; bytearray +Lcom/groupbyinc/flux/common/util/ByteArray; offset length hash $assertionsDisabled Z Z(Lcom/groupbyinc/flux/common/util/BigArrays;Lcom/groupbyinc/flux/common/util/ByteArray;I)V [(Lcom/groupbyinc/flux/common/util/BigArrays;Lcom/groupbyinc/flux/common/util/ByteArray;II)V
this 6Lcom/groupbyinc/flux/common/bytes/PagedBytesReference; ()V !
" $ & ( * , from get (I)B )com/groupbyinc/flux/common/util/ByteArray 1 (J)B / 3 2 4 index ()I slice 5(II)Lcom/groupbyinc/flux/common/bytes/BytesReference; 7
: "java/lang/IllegalArgumentException < java/lang/StringBuilder >
? " "can't slice a buffer with length [ A append -(Ljava/lang/String;)Ljava/lang/StringBuilder; C D
? E (I)Ljava/lang/StringBuilder; C G
? H ], with slice parameters from [ J ], length [ L ] N toString ()Ljava/lang/String; P Q
? R (Ljava/lang/String;)V T
= U streamInput 4()Lcom/groupbyinc/flux/common/io/stream/StreamInput; 0(Lcom/groupbyinc/flux/common/util/ByteArray;II)V Y
Z writeTo (Ljava/io/OutputStream;)V java/io/IOException ^ 6com/groupbyinc/flux/common/apache/lucene/util/BytesRef `
a " java/lang/Math c min (II)I e f
d g =(JILcom/groupbyinc/flux/common/apache/lucene/util/BytesRef;)Z / i 2 j bytes [B l m a n a * java/io/OutputStream q write ([BII)V s t
r u fragmentSize remaining bulkSize os Ljava/io/OutputStream; ref 8Lcom/groupbyinc/flux/common/apache/lucene/util/BytesRef; written +(Ljava/nio/channels/GatheringByteChannel;)V ? java/lang/AssertionError ? GPagedBytesReference failed to align with underlying bytearray. offset [ ? ], size [ ? (Ljava/lang/Object;)V ?
? ? a , &com/groupbyinc/flux/common/io/Channels ? writeToChannel .([BIILjava/nio/channels/WritableByteChannel;)V ? ?
? ?
? " newArray channel (Ljava/nio/channels/GatheringByteChannel;
currentLength
currentOffset toBytes ()[B EMPTY_BYTES ? m a ? m java/util/Arrays ? copyOfRange ([BII)[B ? ?
? ? result toBytesArray /()Lcom/groupbyinc/flux/common/bytes/BytesArray; +com/groupbyinc/flux/common/bytes/BytesArray ? ;(Lcom/groupbyinc/flux/common/apache/lucene/util/BytesRef;)V ?
? ? copyBytesArray t
? ? ([B)V ?
? ? copy copied toChannelBuffer ?()Lcom/groupbyinc/flux/common/jboss/netty/buffer/ChannelBuffer;