com.groupbyinc.flux.common.io.Channels.class Maven / Gradle / Ivy
???? 4 ? &com/groupbyinc/flux/common/io/Channels java/lang/Object
Channels.java .Lcom/groupbyinc/flux/common/SuppressForbidden; reason Channel#read READ_CHUNK_SIZE I @ WRITE_CHUNK_SIZE $assertionsDisabled Z ()V
this (Lcom/groupbyinc/flux/common/io/Channels; readFromFileChannel %(Ljava/nio/channels/FileChannel;JI)[B java/io/IOException #readFromFileChannelWithEofException '(Ljava/nio/channels/FileChannel;J[BII)V
channel Ljava/nio/channels/FileChannel; position J length res [B '(Ljava/nio/channels/FileChannel;J[BII)I %
& java/io/EOFException ( java/lang/StringBuilder *
+ read past EOF. pos [ - append -(Ljava/lang/String;)Ljava/lang/StringBuilder; / 0
+ 1 (J)Ljava/lang/StringBuilder; / 3
+ 4 ] length: [ 6 (I)Ljava/lang/StringBuilder; / 8
+ 9 ] end: [ ; java/nio/channels/FileChannel = size ()J ? @
> A ] C toString ()Ljava/lang/String; E F
+ G (Ljava/lang/String;)V I
) J channelPosition dest
destOffset read java/nio/ByteBuffer P wrap ([BII)Ljava/nio/ByteBuffer; R S
Q T 8(Ljava/nio/channels/FileChannel;JLjava/nio/ByteBuffer;)I V
W buffer Ljava/nio/ByteBuffer; 8(Ljava/nio/channels/FileChannel;JLjava/nio/ByteBuffer;)V limit ()I \ ]
Q ^ isDirect ()Z ` a
Q b remaining d ]
Q e readSingleChunk g V
h duplicate ()Ljava/nio/ByteBuffer; j k
Q l hasRemaining n a
Q o ]
Q q java/lang/Math s min (II)I u v
t w (I)Ljava/nio/Buffer; \ y
Q z y
Q | java/lang/Throwable ~ ? java/lang/AssertionError ? Bfailed to read an entire buffer but also didn't get an EOF (read [ ?
] needed [ ? (Ljava/lang/Object;)V ?
? ? bytesRead bytesToRead tmpBuffer (Ljava/nio/ByteBuffer;J)I O ?
> ? ?FileChannel.read with non zero-length bb.remaining() must always read at least one byte (FileChannel is in blocking mode, see spec of ReadableByteChannel) ? writeToChannel ,([BLjava/nio/channels/WritableByteChannel;)V .([BIILjava/nio/channels/WritableByteChannel;)V ? ?
? source 'Ljava/nio/channels/WritableByteChannel; %java/nio/channels/WritableByteChannel ? write (Ljava/nio/ByteBuffer;)I ? ? ? ? 'wrote more then expected bytes (length= ? ) ? offset toWrite written ?(Ljava/nio/ByteBuffer;Ljava/nio/channels/WritableByteChannel;)V
byteBuffer java/lang/Class ? desiredAssertionStatus ? a
? ?
ConstantValue Code LocalVariableTable LineNumberTable
Exceptions
StackMapTable
SourceFile RuntimeInvisibleAnnotations 1
?
?
? 3 *? ? ? ?
! " ? a ?:*? ? ? * ! "
# $ ? 1 2 3 ? ? ? H*-? '6? 9? )Y? +Y? ,.? 2? 57? 2? :