package up6;

import org.csource.fastdfs.FileInfo;
import up6.store.FastDFSTool;

public class DebugTest {
public static void FatDFS_test(){
	
	byte[] buf = new byte[0];
	String id = FastDFSTool.upload(buf, "txt");
	buf = FileTool.readAllBytes("F:\\test1.txt");
	FastDFSTool.write(id, buf);
	FileInfo f = FastDFSTool.query(id);	
	System.out.println(f.getFileSize());
}

public static void fastDFS_query_test(){
	String id ="group1/M00/00/04/wKgAb2J4yrmEMO7wAAAAAAAAAAA074.txt";
	FileInfo f = FastDFSTool.query(id);
	XDebug.Output(f.getFileSize());
}

	public static void fastDFS_read_test(){
	String id ="group1/M00/00/04/wKgAb2J4yrmEMO7wAAAAAAAAAAA074.txt";
	byte[] data = FastDFSTool.down(id,0,2427);
		//FileInfo f = FastDFSTool.query("");
		XDebug.Output("读取的数据长度",data.length);
	}
}