
com.groupbyinc.flux.common.http.client.HttpDownloadHelper$GetThread.class Maven / Gradle / Ivy
???? 3M Ccom/groupbyinc/flux/common/http/client/HttpDownloadHelper$GetThread java/lang/Thread HttpDownloadHelper.java Jcom/groupbyinc/flux/common/http/client/HttpDownloadHelper$DownloadProgress 9com/groupbyinc/flux/common/http/client/HttpDownloadHelper DownloadProgress GetThread source Ljava/net/URL; dest Ljava/nio/file/Path; hasTimestamp Z timestamp J progress LLcom/groupbyinc/flux/common/http/client/HttpDownloadHelper$DownloadProgress; success ioexception Ljava/io/IOException; is Ljava/io/InputStream; os Ljava/io/OutputStream;
connection Ljava/net/URLConnection; redirections I this$0 ;Lcom/groupbyinc/flux/common/http/client/HttpDownloadHelper; ?(Lcom/groupbyinc/flux/common/http/client/HttpDownloadHelper;Ljava/net/URL;Ljava/nio/file/Path;ZJLcom/groupbyinc/flux/common/http/client/HttpDownloadHelper$DownloadProgress;)V ! " % ()V # '
( * , . 0 2
4 6 8 : < this ELcom/groupbyinc/flux/common/http/client/HttpDownloadHelper$GetThread; h t p run java/io/IOException D get ()Z F G
H ioex openConnection ((Ljava/net/URL;)Ljava/net/URLConnection; K L
M O downloadFile Q G
R
access$000 >(Lcom/groupbyinc/flux/common/http/client/HttpDownloadHelper;)Z T U
V updateTimeStamp X '
Y downloadSucceeded redirectionAllowed (Ljava/net/URL;Ljava/net/URL;)Z 'More than 5 times redirected, giving up ^ (Ljava/lang/String;)V # `
E a message Ljava/lang/String; aSource aDest java/net/URL g ()Ljava/net/URLConnection; K i
h j java/net/URLConnection l setIfModifiedSince (J)V n o
m p https r getProtocol ()Ljava/lang/String; t u
h v java/lang/String x equalsIgnoreCase (Ljava/lang/String;)Z z {
y | getUserInfo ~ u
h "com/groupbyinc/flux/common/Strings ?
isNullOrEmpty ? {
? ? 'Basic auth is only supported for HTTPS! ? !java/nio/charset/StandardCharsets ? UTF_8 Ljava/nio/charset/Charset; ? ? ? ? getBytes (Ljava/nio/charset/Charset;)[B ? ?
y ? !com/groupbyinc/flux/common/Base64 ? encodeBytes ([B)Ljava/lang/String; ? ?
? ?
Authorization ? java/lang/StringBuilder ?
? ( Basic ? append -(Ljava/lang/String;)Ljava/lang/StringBuilder; ? ?
? ? toString ? u
? ? setRequestProperty '(Ljava/lang/String;Ljava/lang/String;)V ? ?
m ? java/net/HttpURLConnection ? setInstanceFollowRedirects (Z)V ? ?
? ? setUseCaches ? ?
m ? setConnectTimeout (I)V ? ?
m ?
ES-Version ? com/groupbyinc/flux/Version ? CURRENT Lcom/groupbyinc/flux/Version; ? ? ? ?
? ?
ES-Build-Hash ? com/groupbyinc/flux/Build ? Lcom/groupbyinc/flux/Build; ? ? ? ? hashShort ? u
? ?
User-Agent ? elasticsearch-plugin-manager ? connect ? '
m ? getResponseCode ()I ? ?
? ? Location ? getHeaderField &(Ljava/lang/String;)Ljava/lang/String; ? ?
? ?
h a \ ]
? getLastModified ()J ? ?
? ? HTTP Authorization failure ? basicAuth newLocation newURL httpConnection Ljava/net/HttpURLConnection; responseCode lastModified isSecureProcotol
isAuthInfoSet java/io/FileNotFoundException ? getInputStream ()Ljava/io/InputStream; ? ?
m ? java/nio/file/OpenOption ? java/nio/file/Files ? newOutputStream G(Ljava/nio/file/Path;[Ljava/nio/file/OpenOption;)Ljava/io/OutputStream; ? ?
? ?
beginDownload ? ' ? ? [B ?
isInterrupted G
java/io/InputStream read ([B)I
java/io/OutputStream
write ([BII)V
onTick ' java/io/Closeable 5com/groupbyinc/flux/common/apache/lucene/util/IOUtils closeWhileHandlingException ([Ljava/io/Closeable;)V
java/nio/file/Path deleteFilesIgnoringExceptions ([Ljava/nio/file/Path;)V
close!
" java/lang/Throwable$ endDownload&