com.groupbyinc.flux.common.apache.http.nio.entity.NFileEntity.class Maven / Gradle / Ivy
???? 2 ? =com/groupbyinc/flux/common/apache/http/nio/entity/NFileEntity @com/groupbyinc/flux/common/apache/http/entity/AbstractHttpEntity Jcom/groupbyinc/flux/common/apache/http/nio/entity/HttpAsyncContentProducer Fcom/groupbyinc/flux/common/apache/http/nio/entity/ProducingNHttpEntity NFileEntity.java file Ljava/io/File;
accessfile Ljava/io/RandomAccessFile; fileChannel Ljava/nio/channels/FileChannel; idx J useFileChannels Z M(Ljava/io/File;Lcom/groupbyinc/flux/common/apache/http/entity/ContentType;Z)V ()V
???????? File 0com/groupbyinc/flux/common/apache/http/util/Args notNull 8(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object; ! "
#
% ' 9com/groupbyinc/flux/common/apache/http/entity/ContentType ) toString ()Ljava/lang/String; + ,
* - setContentType (Ljava/lang/String;)V / 0
1 java/io/File 3 this ?Lcom/groupbyinc/flux/common/apache/http/nio/entity/NFileEntity; contentType ;Lcom/groupbyinc/flux/common/apache/http/entity/ContentType; (Ljava/io/File;)V L(Ljava/io/File;Lcom/groupbyinc/flux/common/apache/http/entity/ContentType;)V
; $(Ljava/io/File;Ljava/lang/String;Z)V Ljava/lang/Deprecated; Ljava/lang/String; #(Ljava/io/File;Ljava/lang/String;)V =
A close java/io/IOException D
F java/io/RandomAccessFile H C
I J L finish
J getContentLength ()J length R Q
4 S isRepeatable ()Z produceContent t(Lcom/groupbyinc/flux/common/apache/http/nio/ContentEncoder;Lcom/groupbyinc/flux/common/apache/http/nio/IOControl;)V r Y @
I [
getChannel !()Ljava/nio/channels/FileChannel; ] ^
I _ =com/groupbyinc/flux/common/apache/http/nio/FileContentEncoder a??????? transfer $(Ljava/nio/channels/FileChannel;JJ)J e f b g @com/groupbyinc/flux/common/apache/http/nio/ContentEncoderChannel i >(Lcom/groupbyinc/flux/common/apache/http/nio/ContentEncoder;)V k
j l java/nio/channels/FileChannel n
transferTo ,(JJLjava/nio/channels/WritableByteChannel;)J p q
o r size t Q
o u 9com/groupbyinc/flux/common/apache/http/nio/ContentEncoder w complete y x z transferred encoder ;Lcom/groupbyinc/flux/common/apache/http/nio/ContentEncoder; ioctrl 6Lcom/groupbyinc/flux/common/apache/http/nio/IOControl; isStreaming
getContent ()Ljava/io/InputStream; java/io/FileInputStream ? 9
? ? writeTo (Ljava/io/OutputStream;)V
Output stream ? java/io/InputStream ? [B ? read ([B)I ? ?
? ? java/io/OutputStream ? write ([BII)V ? ?
? ? flush ?
? ?
? J java/lang/Throwable ? tmp l I outstream Ljava/io/OutputStream; instream Ljava/io/InputStream; Code LocalVariableTable LineNumberTable
StackMapTable
Deprecated RuntimeVisibleAnnotations
Exceptions
SourceFile !
? ? )*? * ? +? $W*+? &*? (,? *,? .? 2? ? * ) 5 6 )
) 7 8 ) ? " M = N O P Q R ( T ? ? ( 4 * 9 ? \ *? * ? +? $W*+? &? ? 5 6
? Y = Z [ \ : ? J *+,?