1.软件包
edu.ustc.gdfeng.lang
edu.ustc.gdfeng.search.webobject
2.包中的类
edu.ustc.gdfeng.lang 类包括
BitConverter
edu.ustc.gdfeng.search.webobject 类包括
FormatHeadUtility
StoragePackage
WebObject
WebObjectHead
WebObjectIterator
WebObjectPackage
WebObjectPackageDescription
WebObjectPackageDescriptionHead
WebObjectPackageHead
WebObjectRecord
WebObjectRecordIterator
3.各个类的功能
(1)public class BitConverter
BitConverter has two functions: getBytes: to convert data formats(including boolean, byte, short, char, int, long, float and double) to bytes; to[Format]: to convert bytes[index] to format(boolean, byte, short, char, int, long, float, double and String);
(2)public class FormatHeadUtility
Check whether FormatVersion is Supported and whether two tokens are the same
(3)public class StoragePackage
Create, open, append and close WebObjectPackage & WebObjectPackageDescription
(4)public class WebObject
WebObject format: 1-30 WebObjectHead MimeType URL Content
(5)public class WebObjectHead
WebObject head format: 1-5 Format Flag(WEBO) 6 Version 7-8 Length of Mime Type 9-10 Length of URL 11-14 Length of Content 15-22 Download Time 23-30 Expected Dead Time
(6)public class WebObjectIterator implements java.util.Iterator<WebObject>
WebObject's Iterator
(7)public class WebObjectPackage
WebObjectPackage format: 1-8 WebObjectPackageHead WebObject 1 WebObject 2 ...
(8)public class WebObjectPackageDescription
WebObjectPackageDescription format: 1-28 WebObjectPackageDescriptionHead WebObjectRecord 1 WebObjectRecord 2 ...
(9)public class WebObjectPackageDescriptionHead
WebObjectPackageDescription head format: 1-5 Format Flag(WOPD) 6 Version 7-8 Base 9-10 Exponent 11-18 CreateTime 19-26 DeadTime 27-28 Token(0x0D 0A)
(10)public class WebObjectPackageHead
WebObjectPackage head format: 1-5 Format Flag(WOP) 6 Version 7-8 Token(0x0D 0A)
(11)public class WebObjectRecord
WebObjectRecord format: [url]/r/n[offset],[size]/r/n
(12)public class WebObjectRecordIterator implements java.util.Iterator<WebObjectRecord>
WebObjectRecord's Iterator