代码拉取完成,页面将自动刷新
package org.csource.fastdfs.test;
import java.io.*;
import java.net.*;
import java.util.*;
import org.csource.common.*;
import org.csource.fastdfs.*;
public class Test1
{
public static void main(String args[])
{
try
{
ClientGlobal.init("fdfs_client.conf");
System.out.println("network_timeout=" + ClientGlobal.g_network_timeout + "ms");
System.out.println("charset=" + ClientGlobal.g_charset);
TrackerGroup tg = new TrackerGroup(new InetSocketAddress[]{new InetSocketAddress("192.168.0.196", 22122)});
TrackerClient tc = new TrackerClient(tg);
TrackerServer ts = tc.getConnection();
if (ts == null)
{
System.out.println("getConnection return null");
return;
}
StorageServer ss = tc.getStoreStorage(ts);
if (ss == null)
{
System.out.println("getStoreStorage return null");
}
StorageClient1 sc1 = new StorageClient1(ts, ss);
NameValuePair[] meta_list = null; //new NameValuePair[0];
String item = "c:/windows/system32/notepad.exe";
String fileid = sc1.upload_file1(item, "exe", meta_list); //쳣
System.out.println("Upload local file "+item+" ok, fileid="+fileid);
}
catch(Exception ex)
{
ex.printStackTrace();
}
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。