Commit 23304aa1 by 雷紫添

增加限流空置。

parent 87796ed3
......@@ -33,16 +33,16 @@ public class test {
byte[] in_b = swapStream.toByteArray(); //in_b为转换之后的结果
final String encodedText = encoder.encodeToString(in_b);*/
Jccj jccj =new Jccj();
File file = new File("D:/appone.zip");
File file = new File("D:/JCCJ-R1100000500002014070001.zip");
FileInputStream inputFile = new FileInputStream(file);
byte[] buffer = new byte[(int)file.length()];
inputFile.read(buffer);
inputFile.close();
//编码
final String encodedText = encoder.encodeToString(buffer);
System.out.println(encodedText);
jccj.setXxsb_zip(encodedText);
jccj.setTaskid("JCXX-R1100000500002014070006");
jccj.setTaskid("JCCJ-R1100000500002014070001");
jccj.setUser_id("350128197311050034");
jccj.setUser_dept("1400000000");
jccj.setVersion("1.00");
......
......@@ -172,11 +172,11 @@ public class FtpUtil {
public static void main(String[] args) {
try {
FileInputStream in=new FileInputStream(new File("D:\\JCCJ-R1100000500002014070001.xml"));
// FileInputStream in=new FileInputStream(new File("D:\\JCCJ-R1100000500002014070001.xml"));
// boolean flag = uploadFile("47.92.129.99", 4546, "ftpuser", "fou3rfnder4SD1", "/home/ftpuser/","/2016/", "JCCJ-两岸三地R1100000500002014070001.xml", in);
boolean flag = downloadFile("47.92.129.99", 4546, "ftpuser", "fou3rfnder4SD1", "2016/", "appone.zip","D:\\");
boolean flag = downloadFile("47.92.129.99", 4546, "ftpuser", "fou3rfnder4SD1", "2016/", "JCCJ-R1100000500002014070001.xml","D:\\");
System.out.println(flag);
} catch (FileNotFoundException e) {
} catch (Exception e) {
e.printStackTrace();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment