J2me环境下实现Tar格式的打包

来源:互联网 发布:程序员刷题 编辑:程序博客网 时间:2024/05/16 08:49

该类只实现J2me下Tar格式简单的打包方法(不支持目录打包),并没有实现解包方法。

Tar头文件格式为

Field OffsetField SizeField0100File name1008File mode1088Owner's numeric user ID1168Group's numeric user ID12412File size in bytes13612Last modification time in numeric Unix time format1488Checksum for header block1561Link indicator (file type)157100Name of linked file

The Link indicator field can have the following values:

Link indicator fieldValueMeaning'0'Normal file(ASCII NUL )Normal file (now obsolete)'1'Hard link '2'Symbolic link '3'Character special '4'Block special '5'Directory'6'FIFO '7'Contiguous file

 

demo类(j2se)

贴图

(j2me)

第一次在CSDN写博客,转载注明出处。

原创粉丝点击