remotepic.java
来自「用于对java已经编译好的.class文件进行反编译」· Java 代码 · 共 85 行
JAVA
85 行
// Decompiled by DJ v2.9.9.61 Copyright 2000 Atanas Neshkov Date: 2007-12-22 19:18:26
// Home Page : http://members.fortunecity.com/neshkov/dj.html - Check often for new version!
// Decompiler options: packimports(3)
// Source File Name: RemotePic.java
package net.fiyu.edit;
import java.io.*;
import java.net.*;
public class RemotePic
{
public RemotePic()
{
}
public boolean download()
{
String s;
String s1;
s = picurl;
s1 = savepath;
URLConnection urlconnection;
URL url = new URL(s);
urlconnection = url.openConnection();
urlconnection.connect();
HttpURLConnection httpurlconnection = (HttpURLConnection)urlconnection;
int i = httpurlconnection.getResponseCode();
if(i == 200)
break MISSING_BLOCK_LABEL_89;
System.out.println("Connect to " + s + " failed,return code:" + i);
return false;
InputStream inputstream;
FileOutputStream fileoutputstream;
int j = urlconnection.getContentLength();
inputstream = urlconnection.getInputStream();
byte abyte0[] = new byte[1024];
File file = new File(s1);
if(!file.exists())
file.createNewFile();
fileoutputstream = new FileOutputStream(file);
int k = 0;
if(j < 0)
{
while(k > -1)
{
k = inputstream.read(abyte0);
if(k > 0)
fileoutputstream.write(abyte0, 0, k);
}
break MISSING_BLOCK_LABEL_277;
}
int l;
for(l = 0; l < j && k != -1;)
{
k = inputstream.read(abyte0);
if(k > 0)
{
fileoutputstream.write(abyte0, 0, k);
l += k;
}
}
if(l >= j)
break MISSING_BLOCK_LABEL_276;
System.out.println("download error");
inputstream.close();
fileoutputstream.close();
file.delete();
return false;
fileoutputstream.flush();
fileoutputstream.close();
inputstream.close();
break MISSING_BLOCK_LABEL_303;
Exception exception;
exception;
exception.printStackTrace();
return false;
return true;
}
public String picurl;
public String savepath;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?