tistis but是什么意思类型的文件

下次自动登录
现在的位置:
& 综合 & 正文
ELF目标文件之一 – TIS ELF文件格式说明书 Book1 (自译中文)
TIS ELF文件格式说明书
关键字:ELF,目标文件,文件格式,说明书
本ELF说明书V1.2是TIS委员会努力的结果。TIS委员会微机工业成员联合组成,该委员会致力于软件接口的标准化,主要是32位Intel体系操作环境的开发工具。其中本ELF的接口包括:目标模块格式,可执行文件格式,调试记录信息和格式。
该委员会的目的是要帮助整个微机工业实现流水线型的软件开发,虽然目前只专注于32位操作环境(译者注:32位芯片)。
Book I: Executable and Linking Format (ELF)
关于ELF:Executable and Linking Format
ELF最先由UNIX系统实验室作为应用程序二进制接口的一部分(ABI)开发并发布.TIS委员会选择了经过改进的ELF标准作为一种可移植的目标文件格式,该文件格式用于32位Intel体系环境,可兼容多种操作系统。
该ELE标准为开发者提供了一套跨越多种操作平台的二进制接口定义以实现流水线型的软件开发.这样将减少不同接口执行的数目,因此较少重新编码和重新编译的次数.
关于本文档
本章描述所谓的ELF(Executable and Linking Format)目标文件格式。主要有三种类型的目标文件:
  ·可重定位文件:保存的代码和数据可以和其他目标文件一起链接,生成可执行文件或可共享的目标文件。
  ·可执行文件:保存了可供执行的程序。
  ·共享目标文件:保存的代码和数据适用于两个文件的链接。首先,链接编辑器将它与别的可重入的和可共享的目标文件进行加工,产生另一个目标文件;然后,动态链接器将该新产生的目标文件与一个可执行文件和其他共享目标(文件)联合起来,产生一个进程映像。
  目标文件由编译器和链接编辑器创建,是程序代码的二进制表示。以二进制表示是为了能在处理器上直接执行。需要抽象机的程序代码(译者注:如JAVA)不能被执行。
  在这些介绍性内容之后,本文的焦点集中在文件格式及其是怎样与生成程序关联起来的。第二章也描述了目标文件的某部分,主要集中在执行程序所需的信息方面。
目标文件参与程序的链接和程序的执行。下图并派显示了从不同角度看到的文件内容,很方便地反映了不同角度下的文件内容的需求是不一样。参加图1 目标文件组织结构。
译者补充一更直观的图(文件管理模式)
ELF header位于文件的开始位置,保存了描述文件组织结构的信息.sections(各域)为连接器保留了大量的目标文件信息(连接器视角):指令,数据,符号表,重定位信息等等.特殊域(sections)的描述在本章稍后的地方,第二章也描述了段(segments),还重程序执行的角度描述了ELF文件.
如果program header table存在的话,它将告诉系统如何创建一个进程的映像文件.用于生成某进程映像文件的所有文件中必须包含一个program header table,但是可重定位文件并不需要;section header table 包含了描述文件各个段 (section)的信息.每个段其表中都有一个入口,每个入口提供了诸如段名,段大小的信息.编译期间用到的文件中必须包含一个section header table,其他目标文件可以包含也可以不包含.(译者注:Linux和Windows的进程空间都采用的是平坦模式,没有x86的段概念,这里ELF中提到的段仅是文件的分段与x86的段没有任何联系。)
注意:除了ELF header的位置是固定的外,其他的各数据模块可变.各文件的结构可能与上图所示不一致.
目标文件格式不仅支持多种处理器,如8位字节和32位体系的,还可扩展到更大的或更小的体系中.因此,目标文件以一种机器无关的格式表示一些的控制数据,实现了以一种通用的方式区别不同的目标文件及解释其内容.文件的其他数据用来供目标处理器译码,不用考虑文件是在哪个机器创建的.
目标文件定义的所有数据结构遵从"自然"大小和相应类型的边界对齐。如果有必要,数据结构会自行填充某些字节来为4字节目标实现4字节的对齐,强行迫使结构的大小是4的倍数,等等。从文件的开始进行计算,数据也应该是对齐的。因此,例如,某个包含一个ELF32_Addr成员的结构在文件内是4字节边界对齐的.
基于可移植性考虑,ELF不使用位域.(待续)
&&&&推荐文章:
【上篇】【下篇】游戏信息 /GAME INFO
TIS-100 TIS-100
游戏类型:
开发厂商:Zachtronics
发售日期:日
发行厂商:Zachtronics
官方网站:
游戏平台:PC
游戏语言:英文
推荐下载软件大小:19MB
游戏画面 / GAME PICTURES
游戏介绍 / BRIEF INTRODUCTION
推荐配置:
操作系统:Windows XP / Vista / 7 / 8
CPU: 2.0 GHz
内存:2 GB RAM
硬盘空间:100 MB available space
最低配置:
操作系统:Windows XP / Vista / 7 / 8
CPU: 2.0 GHz
内存:2 GB RAM
硬盘空间:100 MB available space
相关下载/ DOWNLOAD
最新更新大小链接
猜你喜欢 / GUESS YOU LIKE
厂商:Bethesda
介绍:《耻辱:终极版(Dishonored Definitive Edition)》专题站提供本游戏攻略,完整硬盘版下载,官网,官方网站,存档,发售日期,新闻,截图,视频,评测,评分,破解,补丁,修改器,配置,中文,汉化,秘籍等游戏资料...
动作角色(ARPG)
厂商:Nordic Games
介绍:《咒语力量3(Spellforce 3)》专题站提供本游戏攻略,完整硬盘版下载,官网,官方网站,存档,发售日期,新闻,截图,视频,评测,评分,破解,补丁,修改器,配置,中文,汉化,秘籍等游戏资料...
动作角色(ARPG)
厂商:Re-Logic
介绍:《泰拉瑞亚:来世(Terraria: Otherworld)》专题站提供本游戏攻略,完整硬盘版下载,官网,官方网站,存档,发售日期,新闻,截图,视频,评测,评分,破解,补丁,修改器,配置,中文,汉化,秘籍等游戏资料...
动作角色(ARPG)
厂商:Gaddy Games
介绍:《挖或死(Dig or Die)》专题站提供本游戏攻略,完整硬盘版下载,官网,官方网站,存档,发售日期,新闻,截图,视频,评测,评分,破解,补丁,修改器,配置,中文,汉化,秘籍等游戏资料...
厂商:Fayju
介绍:《神奇青蛙(Amazing Frog ?)》专题站提供本游戏攻略,完整硬盘版下载,官网,官方网站,存档,发售日期,新闻,截图,视频,评测,评分,破解,补丁,修改器,配置,中文,汉化,秘籍等游戏资料...
厂商:Team Meat
介绍:《超级食肉男:永恒(Super Meat Boy Forever)》专题站提供本游戏攻略,完整硬盘版下载,官网,官方网站,存档,发售日期,新闻,截图,视频,评测,评分,破解,补丁,修改器,配置,中文,汉化,秘籍等游戏资料...
我要点评/ COMMENTS
CopyRight (C) 3DMGAME- ,All Rights Reserved
服务电话:(010-)
举报电话:010-&&举报邮箱:君,已阅读到文档的结尾了呢~~
扫扫二维码,随身浏览文档
手机或平板扫扫即可继续访问
上海通用汽车TIS 2000系统简述及应用指南
举报该文档为侵权文档。
举报该文档含有违规或不良信息。
反馈该文档无法正常浏览。
举报该文档为重复文档。
推荐理由:
将文档分享至:
分享完整地址
文档地址:
粘贴到BBS或博客
flash地址:
支持嵌入FLASH地址的网站使用
html代码:
&embed src='/DocinViewer-4.swf' width='100%' height='600' type=application/x-shockwave-flash ALLOWFULLSCREEN='true' ALLOWSCRIPTACCESS='always'&&/embed&
450px*300px480px*400px650px*490px
支持嵌入HTML代码的网站使用
您的内容已经提交成功
您所提交的内容需要审核后才能发布,请您等待!
3秒自动关闭窗口博客分类:
import java.io.BufferedR
import java.io.ByteArrayOutputS
import java.io.DataInputS
import java.io.DataOutputS
import java.io.F
import java.io.FileF
import java.io.FileInputS
import java.io.FileOutputS
import java.io.IOE
import java.io.InputStreamR
import java.io.RandomAccessF
import java.util.ArrayL
import java.util.L
import java.util.StringT
import sun.net.TelnetInputS
import sun.net.TelnetOutputS
import sun.net.ftp.FtpC
import sun.net.ftp.FtpLoginE
public class FtpUtil {
* @param args
public static void main(String[] args) {
FtpUtil ftp = new FtpUtil();
ftp.connect("10.16.12.75", 21, "ftpusr", "ftpusr");
// 上传目录下文件 并可以递归到子目录
// ftp.upPathFile(new File("D:\\ALSC"), "ALSC/");
// 下载目录下多个文件 并可以递归到子目录
//ftp.downPathFile("/opt/ftp/outgoing/cs/", "D:/outgoing/csvc");
// 切换目录
ftp.setPath("/opt/ftp/book");
System.out.println(ftp.getDir());
for (String file : ftp.getFileNameList()) {
System.out.println(file);
// 切换到父级目录
// 创建多目录
// ftp.createDir("aa/bb/cc");
ftp.setPath("ftpTest");
// 删除文件
ftp.deleteFile("bbb.bmp");
System.out.println(ftp.getDir());
for (String file : ftp.getFileNameList()) {
System.out.println(file);
// 上传 下载单个文件
ftp.uploadFile("c:/aaa.bmp", "bbb.bmp");
ftp.downloadFile("bbb.bmp", "c:/bbb");
List&String& list = ftp.getFileList();
for (String file : list) {
System.out.println(file);
ftp.setPath("/opt/ftp/outgoing/cs");
String patternStr = "^CSGET_[0-9]{4}_0085_"+""+"_[0-9]{3}";
// 过滤,获取目录下的文件列表
list = ftp.getFileList(new CSFilter(patternStr));
for (String file : list) {
System.out.println(file);
//下载 过滤后的文件
ftp.downPathFile("/opt/ftp/outgoing/cs/", "D:/outgoing/csvc",new CSFilter(patternStr));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
ftp.close();
private FtpClient ftpClient =
* 打开连接
* @param hostname
* @param port
* @param username
* @param passwd
public void connect(String hostname, int port, String username,
String passwd) {
String msg = "";
ftpClient = new FtpClient(hostname, port);
ftpClient.login(username, passwd);
ftpClient.binary();
msg = "连接成功!";
} catch (FtpLoginException e) {
msg = "登录主机失败,可能是用户名密码错误!";
e.printStackTrace();
} catch (IOException e) {
msg = "登录主机失败,请检验端品是否正确!";
e.printStackTrace();
} catch (SecurityException e) {
msg = "无权连接主机,主确认是否有权限连接主机!";
e.printStackTrace();
System.out.println(msg);
* 关闭连接
public void close() {
if (ftpClient == null) {
ftpClient.closeServer();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
* @param oldName
* @param newName
public boolean renameFile(String oldName, String newName) {
boolean result =
this.ftpClient.rename(oldName, newName);
} catch (IOException e) {
e.printStackTrace();
* 取得相对于当前连接目录的某个目录下所有文件列表
* @param path
public List getFileList(String path) {
List list = new ArrayList();
DataInputS
dis = new DataInputStream(ftpClient.nameList(this.getDir() + path));
String filename = "";
while ((filename = dis.readLine()) != null) {
list.add(filename);
} catch (IOException e) {
e.printStackTrace();
* 读取文件列表
* @throws IOException
public List&String& getFileList() throws IOException {
List&String& fileList = new ArrayList&String&();
InputStreamReader isr =
BufferedReader br =
isr = new InputStreamReader(this.ftpClient.list());
br = new BufferedReader(isr);
String fileName = "";
while (true) {
fileName = br.readLine();
if (fileName == null) {
fileList.add(fileName);
} finally {
if (br != null) {
br.close();
} catch (IOException e) {
e.printStackTrace();
if (isr != null) {
isr.close();
} catch (IOException e) {
e.printStackTrace();
return fileL
* 读取文件列表
* @throws IOException
public List&String& getFileList(FileFilter filter) throws IOException {
List&String& fileList = new ArrayList&String&();
InputStreamReader isr =
BufferedReader br =
isr = new InputStreamReader(this.ftpClient.list());
br = new BufferedReader(isr);
String fileName = "";
while (true) {
fileName = br.readLine();
if (fileName == null) {
if ((filter == null) || filter.accept(new File(fileName)))
fileList.add(fileName);
} finally {
if (br != null) {
br.close();
} catch (IOException e) {
e.printStackTrace();
if (isr != null) {
isr.close();
} catch (IOException e) {
e.printStackTrace();
return fileL
* 获取文件名列表
* @throws IOException
public List&String& getFileNameList() throws IOException {
List&String& fileNameList = new ArrayList&String&();
InputStreamReader isr =
BufferedReader br =
isr = new InputStreamReader(this.ftpClient.nameList(this.getDir()));
br = new BufferedReader(isr);
String fileName = "";
while (true) {
fileName = br.readLine();
if (fileName == null) {
fileNameList.add(fileName);
} finally {
if (br != null) {
br.close();
} catch (IOException e) {
e.printStackTrace();
if (isr != null) {
isr.close();
} catch (IOException e) {
e.printStackTrace();
return fileNameL
* 设置路径 切换目录
* @param path
public boolean setPath(String path) {
if (this.ftpClient != null) {
ftpClient.cd(path);
} catch (IOException e) {
e.printStackTrace();
* 判断是否为目录
* @param line
public boolean isDir(String line) {
return line.startsWith("d");
* 检查文件夹在当前目录下是否存在
* @param dir
public boolean isDirExist(String dir) {
String pwd = "";
pwd = ftpClient.pwd();
ftpClient.cd(dir);
ftpClient.cd(pwd);
} catch (Exception e) {
* 获取当前路径
* @throws IOException
public String getDir() throws IOException {
return this.ftpClient.pwd();
* 向上 切换到父级目录
* @throws IOException
public void up() throws IOException {
if ("/".equals(ftpClient.pwd()) || "//".equals(ftpClient.pwd())) {
this.ftpClient.cdUp();
* 删除文件
* @param fileName
public void deleteFile(String fileName) {
ftpClient.sendServer("dele " + fileName + "\r\n");// 这个地方一定要注意 加上 \r\n
if (ftpClient.readServerResponse() != 250)
System.out.println("删除异常");
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
* 在当前目录下创建文件夹
* @param dir
* @throws Exception
public boolean createDir(String dir) {
ftpClient.ascii();
StringTokenizer s = new StringTokenizer(dir, "/"); // sign
s.countTokens();
String pathName = ftpClient.pwd();
while (s.hasMoreElements()) {
pathName = pathName + "/" + (String) s.nextElement();
ftpClient.sendServer("MKD " + pathName + "\r\n");
} catch (Exception e) {
ftpClient.readServerResponse();
ftpClient.binary();
} catch (IOException e1) {
e1.printStackTrace();
* 上传文件
* @param localFile
* @param targetFileName
public boolean uploadFile(String localFile, String targetFileName) {
boolean result =
if (this.ftpClient == null) {
TelnetOutputStream tos =
RandomAccessFile sendFile =
DataOutputStream dos =
File file = new File(localFile);
sendFile = new RandomAccessFile(file, "r");
sendFile.seek(0);
tos = this.ftpClient.put(targetFileName);
dos = new DataOutputStream(tos);
int ch = 0;
while (sendFile.getFilePointer() & sendFile.length()) {
ch = sendFile.read();
dos.write(ch);
} catch (Exception ex) {
} finally {
if (tos != null) {
tos.close();
} catch (IOException e) {
e.printStackTrace();
if (dos != null) {
dos.close();
} catch (IOException e) {
e.printStackTrace();
if (sendFile != null) {
sendFile.close();
} catch (IOException e) {
e.printStackTrace();
* 上传文件
* @param localFile
* @param targetFileName
public boolean uploadFile(File localFile, String targetFileName) {
boolean result =
if (this.ftpClient == null) {
TelnetOutputStream tos =
RandomAccessFile sendFile =
DataOutputStream dos =
sendFile = new RandomAccessFile(localFile, "r");
sendFile.seek(0);
tos = this.ftpClient.put(targetFileName);
dos = new DataOutputStream(tos);
int ch = 0;
while (sendFile.getFilePointer() & sendFile.length()) {
ch = sendFile.read();
dos.write(ch);
} catch (Exception ex) {
} finally {
if (tos != null) {
tos.close();
} catch (IOException e) {
e.printStackTrace();
if (dos != null) {
dos.close();
} catch (IOException e) {
e.printStackTrace();
if (sendFile != null) {
sendFile.close();
} catch (IOException e) {
e.printStackTrace();
* 上传本地目录下的所有文件到服务器上
* @param srcPath
* @param tagPath
* @param level
递归的级别
* @see [类、类#方法、类#成员]
public boolean upPathFile(File srcPathFile, String tagPath) {
buildList(tagPath.substring(0, tagPath.lastIndexOf("/")));
boolean result =
File temp[] = srcPathFile.listFiles();
for (int i = 0; i & temp. i++) {
if (temp[i].isDirectory()) {
if (tagPath.lastIndexOf('/') & 0) {
result = upPathFile(temp[i], tagPath
+ temp[i].getName() + "/");
result = upPathFile(temp[i], tagPath + "/"
+ temp[i].getName() + "/");
if (tagPath.lastIndexOf('/') & 0) {
result = uploadFile(temp[i], tagPath
+ temp[i].getName());
result = uploadFile(temp[i], tagPath + "/"
+ temp[i].getName());
} catch (Exception e) {
e.printStackTrace();
* 下载文件
* @param srcFileName
* @param targetFileName
public boolean downloadFile(String srcFileName, String targetFileName) {
if (this.ftpClient == null) {
TelnetInputStream tis =
RandomAccessFile getFile =
boolean result =
File file = new File(targetFileName);
getFile = new RandomAccessFile(file, "rw");
getFile.seek(0);
tis = this.ftpClient.get(srcFileName);
DataInputStream dis = new DataInputStream(tis);
int ch = 0;
while (true) {
ch = dis.read();
if (ch & 0) {
getFile.write(ch);
getFile.close();
} catch (IOException e) {
} finally {
if (getFile != null) {
getFile.close();
} catch (IOException e) {
e.printStackTrace();
if (tis != null) {
tis.close();
} catch (IOException e) {
e.printStackTrace();
* 下载文件
* @param srcFileName
* @param targetFileName
public boolean downloadFile(String srcFileName, File targetFileName) {
if (this.ftpClient == null) {
TelnetInputStream tis =
RandomAccessFile getFile =
boolean result =
getFile = new RandomAccessFile(targetFileName, "rw");
getFile.seek(0);
tis = this.ftpClient.get(srcFileName);
DataInputStream dis = new DataInputStream(tis);
int ch = 0;
while (true) {
ch = dis.read();
if (ch & 0) {
getFile.write(ch);
getFile.close();
} catch (IOException e) {
} finally {
if (getFile != null) {
getFile.close();
} catch (IOException e) {
e.printStackTrace();
if (tis != null) {
tis.close();
} catch (IOException e) {
e.printStackTrace();
* 下载远程目录下的所有文件到本地
* @param srcPathFile
远程目录文件
* @param tagPath
本地存放目录
* @throws IOException
* @see [类、类#方法、类#成员]
public boolean downPathFile(String srcPath, String tagPath)
throws IOException {
boolean result =
File tagFile = new File(tagPath);
tagFile.mkdirs();
setPath(srcPath);
String tempPath = "";
List&String& list = getFileList();
for (int i = 0; i & list.size(); i++) {
String currPath = list.get(i);
String fileName = getFileName(currPath);
String currPathFul = getDir() + "/" + fileN
if (tagPath.lastIndexOf('/') & 0) {
tempPath = tagPath
+ currPathFul.substring(currPathFul.lastIndexOf("/"),
currPathFul.length());
tempPath = tagPath
+ currPathFul.substring(currPathFul.lastIndexOf("/"),
currPathFul.length());
if (isDir(currPath)) {
srcPath = currPathFul + "/";
downPathFile(srcPath, tempPath);
srcPath = currPathF
downloadFile(srcPath, tempPath);
* 下载远程目录下的所有文件到本地,过滤规则
* @param srcPathFile
远程目录文件
* @param tagPath
本地存放目录
* @param fileFilter
下载过滤文件
* @throws IOException
* @see [类、类#方法、类#成员]
public boolean downPathFile(String srcPath, String tagPath,
FileFilter fileFilter) throws IOException {
boolean result =
File tagFile = new File(tagPath);
tagFile.mkdirs();
setPath(srcPath);
String tempPath = "";
List&String& list = getFileList(fileFilter);
for (int i = 0; i & list.size(); i++) {
String currPath = list.get(i);
String fileName = getFileName(currPath);
String currPathFul = getDir() + "/" + fileN
if (tagPath.lastIndexOf('/') & 0) {
tempPath = tagPath
+ currPathFul.substring(currPathFul.lastIndexOf("/"),
currPathFul.length());
tempPath = tagPath
+ currPathFul.substring(currPathFul.lastIndexOf("/"),
currPathFul.length());
if (isDir(currPath)) {
srcPath = currPathFul + "/";
downPathFile(srcPath, tempPath, fileFilter);
srcPath = currPathF
downloadFile(srcPath, tempPath);
public String getFileName(String line) {
String filename = (String) parseLine(line).get(8);
for (i = 9; i & parseLine(line).size(); i++) {
filename = filename + " " + ((String) parseLine(line).get(i));
// 处理getFileList取得的行信息
private ArrayList parseLine(String line) {
ArrayList s1 = new ArrayList();
StringTokenizer st = new StringTokenizer(line, " ");
while (st.hasMoreTokens()) {
s1.add(st.nextToken());
return s1;
* 从FTP文件服务器上下载文件SourceFileName,到本地destinationFileName 所有的文件名中都要求包括完整的路径名在内
* @param SourceFileName
* @param destinationFileName
* @throws Exception
public void downFile(String SourceFileName, String destinationFileName)
throws Exception {
ftpClient.binary(); // 一定要使用二进制模式
TelnetInputStream ftpIn = ftpClient.get(SourceFileName);
byte[] buf = new byte[204800];
int bufsize = 0;
FileOutputStream ftpOut = new FileOutputStream(destinationFileName);
while ((bufsize = ftpIn.read(buf, 0, buf.length)) != -1) {
ftpOut.write(buf, 0, bufsize);
ftpOut.close();
ftpIn.close();
* 从FTP文件服务器上下载文件,输出到字节数组中
* @param SourceFileName
* @return byte[]
* @throws Exception
public byte[] downFile(String SourceFileName) throws Exception {
ftpClient.binary(); // 一定要使用二进制模式
TelnetInputStream ftpIn = ftpClient.get(SourceFileName);
ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
byte[] buf = new byte[204800];
int bufsize = 0;
while ((bufsize = ftpIn.read(buf, 0, buf.length)) != -1) {
byteOut.write(buf, 0, bufsize);
byte[] return_arraybyte = byteOut.toByteArray();
byteOut.close();
ftpIn.close();
return return_
* 上传文件到FTP服务器,destination路径以FTP服务器的"/"开始,带文件名、 上传文件只能使用二进制模式,
* 当文件存在时再次上传则会覆盖
* @param source
* @param destination
* @throws Exception
public void upFile(String source, String destination) throws Exception {
buildList(destination.substring(0, destination.lastIndexOf("/")));
ftpClient.binary(); // 此行代码必须放在buildList之后
TelnetOutputStream ftpOut = ftpClient.put(destination);
TelnetInputStream ftpIn = new TelnetInputStream(new FileInputStream(
source), true);
byte[] buf = new byte[204800];
int bufsize = 0;
while ((bufsize = ftpIn.read(buf, 0, buf.length)) != -1) {
ftpOut.write(buf, 0, bufsize);
ftpIn.close();
ftpOut.close();
* JSP中的流上传到FTP服务器, 上传文件只能使用二进制模式,当文件存在时再次上传则会覆盖 字节数组做为文件的输入流,
* 此方法适用于JSP中通过request输入流来直接上传文件在RequestUpload类中调用了此方法,
* destination路径以FTP服务器的"/"开始,带文件名
* @param sourceData
* @param destination
* @throws Exception
public void upFile(byte[] sourceData, String destination) throws Exception {
buildList(destination.substring(0, destination.lastIndexOf("/")));
ftpClient.binary(); // 此行代码必须放在buildList之后
TelnetOutputStream ftpOut = ftpClient.put(destination);
ftpOut.write(sourceData, 0, sourceData.length);
// ftpOut.flush();
ftpOut.close();
* 在FTP服务器上建立指定的目录,当目录已经存在的情下不会影响目录下的文件,这样用以判断FTP
* 上传文件时保证目录的存在目录格式必须以"/"根目录开头
* @param pathList
* @throws Exception
public void buildList(String pathList) {
ftpClient.ascii();
StringTokenizer s = new StringTokenizer(pathList, "/"); // sign
int count = s.countTokens();
String pathName = "";
while (s.hasMoreElements()) {
pathName = pathName + (String) s.nextElement();
ftpClient.sendServer("XMKD " + pathName + "\r\n");
} catch (Exception e) {
int reply = ftpClient.readServerResponse();
pathName = pathName + "/";
ftpClient.binary();
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
import java.io.F
import java.io.FileF
import java.util.ArrayL
import java.util.StringT
import java.util.regex.P
public class CSFilter implements FileFilter {
private String patternS
//"^CSGET_[0-9]{4}_0085_"+""+"_[0-9]{3}"
public CSVCFilter(String str){
this.patternStr =
this.pattern = pile(patternStr);
public boolean accept(File pathname) {
String strName = pathname.getName();
if (!isDir(strName)) {
strName = getFileName(strName);
System.out.println(strName);
return pattern.matcher(strName).matches();
public boolean isDir(String strName) {
return ((String) parseLine(strName).get(0)).indexOf("d") != -1;
public String getFileName(String line) {
String filename = (String) parseLine(line).get(8);
for (i = 9; i & parseLine(line).size(); i++) {
filename = filename + " " + ((String) parseLine(line).get(i));
// 处理getFileList取得的行信息
private ArrayList parseLine(String line) {
ArrayList s1 = new ArrayList();
StringTokenizer st = new StringTokenizer(line, " ");
while (st.hasMoreTokens()) {
s1.add(st.nextToken());
return s1;
public String getFileSize(String line) {
return (String) parseLine(line).get(4);
public String getFileDate(String line) {
ArrayList a = parseLine(line);
return (String) a.get(5) + " " + (String) a.get(6) + " "
+ (String) a.get(7);
下载速度提升
public boolean downloadFile(String srcFileName, File targetFileName)
//下载速度太慢,用如下方式进行提升
byte[] recvbuf = new byte[1024];
while((ch = dis.read(recvbuf)) & 0){
getFile.write(recvbuf,0,ch);
while (true) {
ch = dis.read();
if (ch & 0) {
getFile.write(ch);
浏览: 124013 次
来自: 杭州
配置分片:
mongo -port 27017config
配置路由:mongs:
40200sc ...
哥们,干得漂亮。。
配置列子如下
&?xml version=&1 ...
写道博主你好,最近在看你的js系列文章,发 ...

我要回帖

更多关于 acc是什么类型的文件 的文章

 

随机推荐