打tar包工具TarUtil(5)
来源:互联网 发布:淘宝导出数据包 编辑:程序博客网 时间:2024/05/21 19:23
finally
{
filesets = savedFileSets;
if (tOut != null)
{
try
{
// close up
tOut.close();
}
catch (IOException e)
{
//LOG.error(e);
}
}
}
}
/**
* tar a file
* @param file the file to tar
* @param tOut the output stream
* @param vPath the path name of the file to tar
* @param tarFileSet the fileset that the file came from.
* @throws IOException 抛出IO异常
*/
protected void tarFile(File file, TarOutputStream tOut, String vPath,
TarFileSet tarFileSet) throws IOException
{
FileInputStream fIn = null;
String fullpath = tarFileSet.getFullpath();
if (fullpath.length() > 0)
{
vPath = fullpath;
}
else
{
// don't add "" to the archive
if (vPath.length() <= 0)
{
return;
}
if (file.isDirectory() && !vPath.endsWith("/"))
{
vPath += "/";
}
String prefix = tarFileSet.getPrefix();
// '/' is appended for compatibility with the zip task.
if (prefix.length() > 0 && !prefix.endsWith("/"))
{
prefix = prefix + "/";
}
vPath = prefix + vPath;
}
- 打tar包工具TarUtil(5)
- 打tar包工具TarUtil(1)
- 打tar包工具TarUtil(2)
- 打tar包工具TarUtil(3)
- 打tar包工具TarUtil(4)
- 打tar包工具TarUtil(6)
- 打tar包工具TarUtil(7)
- 打tar包工具TarUtil(8)
- 打tar包工具TarUtil(9)
- 打tar包工具TarUtil(10)
- 打tar包工具TarUtil(11)
- 打tar包工具TarUtil(12)
- 打tar包工具TarUtil(13)
- 打tar包工具TarUtil(14)
- 打tar包工具TarUtil(15)
- 打tar包工具TarUtil(16)
- 解压tar包工具UntarUtil(1)
- 解压tar包工具UntarUtil(2)
- 打tar包工具TarUtil(1)
- 打tar包工具TarUtil(2)
- 开始学习啦
- 打tar包工具TarUtil(3)
- 打tar包工具TarUtil(4)
- 打tar包工具TarUtil(5)
- 打tar包工具TarUtil(6)
- 打tar包工具TarUtil(7)
- 打tar包工具TarUtil(8)
- 打tar包工具TarUtil(9)
- 打tar包工具TarUtil(10)
- 打tar包工具TarUtil(11)
- 打tar包工具TarUtil(12)
- 打tar包工具TarUtil(13)