
com.groupbyinc.flux.common.http.client.HttpDownloadHelper.class Maven / Gradle / Ivy
???? 3 ? 9com/groupbyinc/flux/common/http/client/HttpDownloadHelper java/lang/Object HttpDownloadHelper.java Ccom/groupbyinc/flux/common/http/client/HttpDownloadHelper$GetThread GetThread Icom/groupbyinc/flux/common/http/client/HttpDownloadHelper$VerboseProgress VerboseProgress Fcom/groupbyinc/flux/common/http/client/HttpDownloadHelper$NullProgress NullProgress Jcom/groupbyinc/flux/common/http/client/HttpDownloadHelper$DownloadProgress DownloadProgress Ecom/groupbyinc/flux/common/http/client/HttpDownloadHelper$Checksummer Checksummer ;com/groupbyinc/flux/common/http/client/HttpDownloadHelper$2 ;com/groupbyinc/flux/common/http/client/HttpDownloadHelper$1 useTimestamp Z skipExisting
SHA1_CHECKSUM GLcom/groupbyinc/flux/common/http/client/HttpDownloadHelper$Checksummer; MD5_CHECKSUM ()V
! # % this ;Lcom/groupbyinc/flux/common/http/client/HttpDownloadHelper; download ?(Ljava/net/URL;Ljava/nio/file/Path;Lcom/groupbyinc/flux/common/http/client/HttpDownloadHelper$DownloadProgress;Lcom/groupbyinc/flux/common/unit/TimeValue;)Z java/lang/Exception + %Lcom/groupbyinc/flux/common/Nullable; java/lang/InterruptedException . java/nio/file/LinkOption 0 java/nio/file/Files 2 exists 2(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z 4 5
3 6
! getLastModifiedTime S(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Ljava/nio/file/attribute/FileTime; 9 :
3 ; java/nio/file/attribute/FileTime = toMillis ()J ? @
> A ?(Lcom/groupbyinc/flux/common/http/client/HttpDownloadHelper;Ljava/net/URL;Ljava/nio/file/Path;ZJLcom/groupbyinc/flux/common/http/client/HttpDownloadHelper$DownloadProgress;)V C
D setDaemon (Z)V F G
H start J
K )com/groupbyinc/flux/common/unit/TimeValue M millis O @
N P join (J)V R S
T isAlive ()Z V W
X 1com/groupbyinc/flux/ElasticsearchTimeoutException Z java/lang/StringBuilder \
] ! #The GET operation took longer than _ append -(Ljava/lang/String;)Ljava/lang/StringBuilder; a b
] c -(Ljava/lang/Object;)Ljava/lang/StringBuilder; a e
] f , stopping it. h toString ()Ljava/lang/String; j k
] l ((Ljava/lang/String;[Ljava/lang/Object;)V n
[ o closeStreams q
r java/lang/Throwable t
wasSuccessful v W
w ie Ljava/lang/InterruptedException; source Ljava/net/URL; dest Ljava/nio/file/Path; progress LLcom/groupbyinc/flux/common/http/client/HttpDownloadHelper$DownloadProgress; timeout +Lcom/groupbyinc/flux/common/unit/TimeValue; timestamp J hasTimestamp getThread ELcom/groupbyinc/flux/common/http/client/HttpDownloadHelper$GetThread; downloadAndVerifyChecksum ?(Ljava/net/URL;Ljava/nio/file/Path;Ljava/nio/file/Path;Lcom/groupbyinc/flux/common/http/client/HttpDownloadHelper$DownloadProgress;Lcom/groupbyinc/flux/common/unit/TimeValue;Lcom/groupbyinc/flux/common/http/client/HttpDownloadHelper$Checksummer;)Z java/io/FileNotFoundException ? !java/nio/file/NoSuchFileException ? ) *
? readAllBytes (Ljava/nio/file/Path;)[B ? ?
3 ? !java/nio/charset/StandardCharsets ? UTF_8 Ljava/nio/charset/Charset; ? ? ? ? readAllLines @(Ljava/nio/file/Path;Ljava/nio/charset/Charset;)Ljava/util/List; ? ?
3 ? java/util/List ? size ()I ? ? ? ? 4com/groupbyinc/flux/ElasticsearchCorruptionException ? "invalid format for checksum file ( ? name ? k ? ), expected 1 line, got: ? (I)Ljava/lang/StringBuilder; a ?
] ? (Ljava/lang/String;)V ?
? ? [B ? get (I)Ljava/lang/Object; ? ? ? ? java/lang/String ? checksum ([B)Ljava/lang/String; ? ? ? equals (Ljava/lang/Object;)Z ? ?
? ? incorrect hash ( ? ), file hash: [ ? ], expected: [ ? ] ? java/nio/file/Path ? 5com/groupbyinc/flux/common/apache/lucene/util/IOUtils ? deleteFilesIgnoringExceptions ([Ljava/nio/file/Path;)V ? ?
? ? java/net/URL ? java/io/IOException ? fileBytes
checksumLines $Ljava/util/List; Ljava/util/List; checksumHex Ljava/lang/String; fileHex e Ljava/io/IOException; checksumURL originalFile checksumFile hashFunc
access$000 >(Lcom/groupbyinc/flux/common/http/client/HttpDownloadHelper;)Z x0
! ?
! ? Code LocalVariableTable LineNumberTable
StackMapTable
Exceptions "RuntimeVisibleParameterAnnotations LocalVariableTypeTable
SourceFile InnerClasses ! ? A *? "*? $*? &? ? ' ( ? 3 5 6 ) * ? ? ?,? 1? 7? *? &? ?-? ?
Y? 8N 76*? $? ,? 1? 7? ,? 1?