Package jp.gr.java_conf.dangan.util.lha
Class LhaHeader
java.lang.Object
jp.gr.java_conf.dangan.util.lha.LhaHeader
- All Implemented Interfaces:
Cloneable
LHA?w?b?_???????B
?}???N???X?? java.util.zip ?p?b?P?[?W???? ZipEntry ????????A ?w?b?_?????o?????????????[?e?B???e?B???????????_???????B
?}???N???X?? set?n???\?b?h???~??????????????`?F?b?N?? getBytes() ?????s????????????????????B?????_???????????}???B
?}???N???X?? java.util.zip ?p?b?P?[?W???? ZipEntry ????????A ?w?b?_?????o?????????????[?e?B???e?B???????????_???????B
?}???N???X?? set?n???\?b?h???~??????????????`?F?b?N?? getBytes() ?????s????????????????????B?????_???????????}???B
-- revision history -- $Log: LhaHeader.java,v $ Revision 1.2.2.3 2005/05/03 07:50:30 dangan [bug fix] exportLevel1Header() ?? skip size ???`?F?b?N??????????????????B Revision 1.2.2.2 2005/02/02 00:57:46 dangan [bug fix] importLevelXHeader(byte[], String) ???t?@?C???T?C?Y?? int ??????????????????? 31?r?b?g?l???????T?C?Y???t?@?C??????????????????????????????C???B Revision 1.2.2.1 2003/07/20 13:19:21 dangan [bug fix] exportDirNameExtHeader(String) ?? System.arraycopy ?? src ?? dest ???z?u??????????????B Revision 1.2 2002/12/08 00:00:00 dangan [maintenance] LhaConstants ???? CompressMethod ?????N???X???????X???????????C???B Revision 1.1 2002/12/05 00:00:00 dangan [improvement] 64?r?b?g?t?@?C???T?C?Y?w?b?_???????B [change] LhaUtil.DefaultEncoding ???? LhaProperty.encoding ???g?p?????????????X?B getNextHeaderData() ?? getFirstHeaderData() ?????O???X?B ?V??? getNextHeaderData() ???????o?????????u?? ?w?b?_????????????????? null ???????B LhaHeader ???g??????T?u?N???X???g?p?????l???????? createInstance() ???????B Revision 1.0 2002/08/05 00:00:00 dangan add to version control [bug fix] setDate( null ) ????????????B setCompressMethod( null ) ????????????B exportLevel2,3Header ?? Date ?? 32bit ?? time_t ???????O???l(?????l??????)??????????????????B [change] exportHeader ?? ?w?b?_???x???? 0,1,2,3 ?????????????????? IllegalStateException ????????????????X?B [maintenance] ?\?[?X???? ?^?u?p?~ ???C?Z???X????C??
- Version:
- $Revision: 1.2.2.3 $
- Author:
- $Author: dangan $
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
CRC?l??????????????????l?B ???x??0?w?b?_??CRC?l???????????????????????Bstatic final int
?s?????????????l?B LhaHeader.getCRC(), LhaHeader.getCompressedSize(), LhaHeader.getOriginalSzie() ???}???l?????????????? ?????O?????????A?????l???s?????????????????B -
Constructor Summary
ConstructorsConstructorDescriptionLhaHeader
(byte[] HeaderData) ?w?b?_?f?[?^???? ?V??? LhaHeader ?? ?C???X?^???X?????????B
?G???R?[?h?? LhaUtil.DefaultEncode ???g?p???????B?w?b?_?f?[?^???? ?V??? LhaHeader ?? ?C???X?^???X?????????Bpath ????????O?????? LhaHeader ???C???X?^???X?????????B
?p?X?f???~?^???? File.separator ???g?p?????}???B
path ?? ?p?X?f???~?^???^?[?~?l?[?g??????????????? ?f?B???N?g?????????????????????Bpath ????????O???????A???I?X?V?????? date ?? LhaHeader ???C???X?^???X?????????B
?p?X?f???~?^???? File.separator ???g?p?????}???B
path ?? ?p?X?f???~?^???^?[?~?l?[?g??????????????? ?f?B???N?g?????????????????????B -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
checkHeaderData
(byte[] HeaderData) ?w?b?_?f?[?^?????????????????`?F?b?N?????Bclone()
?}???I?u?W?F?N?g???R?s?[??????????????Bstatic LhaHeader
createInstance
(byte[] HeaderData, Properties property) property ?? ?L?["lha.header" ???????t???????????????g?p???? HeaderData ???? LhaHeader ???C???X?^???X?????????Bprotected byte[][]
exportExtendHeaders
(String encode) ?g??w?b?_???o?C?g?z?????`???????o???????B ?}?????\?b?h???I?[?o?[???C?h?????????????? ?l?X???g??w?b?_???????????}???????\???????B LhaHeader ???? private ?????o?????? ExtraExtHeaders ???o?^???????g??w?b?_???????? ???????????????B ?o?????`???? ?????o?C?g?????g??w?b?_?????q ?}????A?g??w?b?_?f?[?^???i?[?????A ?????g??w?b?_???????????Y?t????????Bbyte[]
getBytes()
?}??LhaHeader???f?[?^???g?p???? ?w?b?_?f?[?^???????A ???????o?C?g?z?????`???????B
?G???R?[?h???f?t?H???g?????????g?p???????Bbyte[]
?}??LhaHeader???f?[?^???g?p???? ?w?b?_?f?[?^???????A ???????o?C?g?z?????`???????Blong
?f?[?^?????k?????T?C?Y???????B?f?[?^?????k???????@??????????????????????Bint
getCRC()
?f?[?^??CRC16?l???????Bprotected byte[]
???x?? 0 ?w?b?_?A ???x?? 1 ?w?b?_?????? ?t???????????\???????????{?w?b?_?????g??f?[?^???????Bstatic byte[]
?????X?g???[?????? ???????w?b?_???????????B
?}?????\?b?h?????x??1?w?b?_?A???????? ???x??3?w?b?_?? ?????f?[?^????????????A?w?b?_?S???????????????????? in.mark( 65536 ) ?? ???E???L???? ???????????\?????????A ???????? reset() ???????? ?????????f?[?^???????????? ???\?????????B
?????AInputStream ??mark/reset ?????????????? ?X?g???[???I?[?t???? ?w?b?_???????f?[?^??????????? ?w?b?_???S?????????????????? EndOfStream???B??????????A reset()???????? ?????????f?[?^???????????????\?????????Bint
?}???w?b?_???w?b?_???x?????????B?f?[?^?????I?X?V???????????Bprotected byte
???x?? 0 ?w?b?_???L?????? DOS ???t?@?C?????????????Bstatic byte[]
?????X?g???[?????? ?????w?b?_???????????B
?}?????\?b?h?????x??1?w?b?_?A???????? ???x??3?w?b?_?? ?????f?[?^????????????A?w?b?_?S???????????????????? in.mark( 65536 ) ?? ???E???L???? ???????????\?????????A ???????? reset() ???????? ?????????f?[?^???????????? ???\?????????B
?????A?X?g???[???I?[?t???? ?w?b?_???????f?[?^????????? ?? ?w?b?_???S?????????????????? EndOfStream???B??????????A reset()???????? ?????????f?[?^???????????????\?????????Blong
?f?[?^?????k?O???T?C?Y???????Bbyte
getOSID()
?}???w?b?_????????? OS ???????q???????BgetPath()
?f?[?^?????O?A ?????????f?[?^???t?@?C?????????????????p?X?????????B
?p?X??????????????AWindows ?n?? A: ???????? ?h???C?u????????????????????B
?p?X?f???~?^???? File.separator ???g?p?????Bprotected void
importExtendHeader
(byte[] HeaderData, int index, int length, String encode) ?g??w?b?_???????????B ?}?????\?b?h???I?[?o?[???C?h?????????????? ?l?X???g??w?b?_???????????}???????\???????B LhaHeader ???? ?g??w?b?_?? private ?????o?????? ExtraExtHeaders ???o?^???????????????Bvoid
setCompressedSize
(long size) ???k???f?[?^?T?C?Y???????????B
LhaHeader.UNKNOWN( -1 ) ?? ?T?C?Y?s???????? ????????????????????????????????B
???? ???x??0,1,3 ?????????????????? 4?o?C?g?l?????????????? 4?o?C?g???\??????????l?????????????? getByte() ???????O????????Bvoid
setCompressMethod
(String method) ???k?@????????????????Bvoid
setCRC
(int crc) ???k?O???f?[?^?? CRC16?l???????????B
LhaHeader.UNKNOWN( -1 ) ?? ?T?C?Y?s???????? ????????????????????????????????B
LhaHeader.NO_CRC( -2 ) ?? ???x??0?w?b?_???? ???? CRC?l???o????????}???????????????????l ???????B
?????w?b?_???x???????? LhaHeader.NO_CRC( -2 ) ???????????????O?????????? getBytes() ???? ???O????????????????????}???B
?L????????????2?o?C?g???A????2?o?C?g?????????????Bprotected void
setExtraData
(byte[] data) ???x?? 0,1?w?b?_?????g?p?????? ???{?w?b?_?? ?g????????????????B
?g????????o?C?g?????????????????????A?}?????\?b?h?? ??????z?????????O?????????}?????????B??????z???????? getBytes()???????O????????Bvoid
setHeaderLevel
(int level) ?w?b?_???x?????????????B
?????????????????? 0,1,2,3 ????????????????B
?w?b?_???x???????X???p?X???????????ALastModified ????????? ???????????????????????????K?v???????Bvoid
setLastModified
(Date date) ???k?f?[?^?????I?X?V???????????????B
?w?b?_???x???? 0,1 ???????? MsdosDate???\???????????A ?w?b?_???x???? 2,3 ???????? 4byte ?? time_t???\?????????? ?????t??????????????????B
???????????????? ?}?????\?b?h?????O?????????}?????????? ???}???B????????????????? ?}?????\?b?h?????O???????????A getBytes() ???????O????????Bprotected void
setLevel0DosAttribute
(byte attribute) ???x?? 0?w?b?_?????????o?????????A MS-DOS ???t?@?C?????????????????Bvoid
setOriginalSize
(long size) ???k?O?f?[?^?T?C?Y???????????B
LhaHeader.UNKNOWN( -1 ) ?? ?T?C?Y?s???????? ????????????????????????????????B
???? ???x??0,1,3 ?????????????????? 4?o?C?g?l?????????????? 4?o?C?g???\??????????l?????????????? getByte() ???????O????????Bvoid
setOSID
(byte id) ?}???w?b?_??OS???L?????????????????????A ?????f?[?^???????????????????????? OS???????q???????????Bvoid
?f?[?^?????O?A?????????f?[?^???t?@?C?????????????A ?f?[?^???p?X???????????B
?p?X?f???~?^???? File.separator ???g?p?????B
?w?b?_???x?????????? path ?????o?C?g???????????????????A ?}?????\?b?h????????z???????????? ???O?????????}???? ?????B??????z?????????? ?}?????\?b?h?????O???????????A getBytes()???????O???????
-
Field Details
-
UNKNOWN
public static final int UNKNOWN?s?????????????l?B LhaHeader.getCRC(), LhaHeader.getCompressedSize(), LhaHeader.getOriginalSzie() ???}???l?????????????? ?????O?????????A?????l???s?????????????????B- See Also:
-
NO_CRC
public static final int NO_CRCCRC?l??????????????????l?B ???x??0?w?b?_??CRC?l???????????????????????B- See Also:
-
-
Constructor Details
-
LhaHeader
path ????????O?????? LhaHeader ???C???X?^???X?????????B
?p?X?f???~?^???? File.separator ???g?p?????}???B
path ?? ?p?X?f???~?^???^?[?~?l?[?g??????????????? ?f?B???N?g?????????????????????B- Parameters:
path
- ?p?X??- Throws:
IllgelArgumentException
- path ?? null ?? ??????????????????????????
-
LhaHeader
path ????????O???????A???I?X?V?????? date ?? LhaHeader ???C???X?^???X?????????B
?p?X?f???~?^???? File.separator ???g?p?????}???B
path ?? ?p?X?f???~?^???^?[?~?l?[?g??????????????? ?f?B???N?g?????????????????????B- Parameters:
path
- ?p?X??date
- ???I?X?V????- Throws:
IllgelArgumentException
- path ?? null ?? ?????????????????????????A date ?? null???????????B
-
LhaHeader
public LhaHeader(byte[] HeaderData) ?w?b?_?f?[?^???? ?V??? LhaHeader ?? ?C???X?^???X?????????B
?G???R?[?h?? LhaUtil.DefaultEncode ???g?p???????B- Parameters:
HeaderData
- ?w?b?_?f?[?^- Throws:
IndexOutOfBoundsException
- ?w?b?_?f?[?^??????????????? ?f?[?^???????????????????u?? HeaderData ???????O????????IllegalArgumentException
- ?w?b?_???x???? 0,1,2,3 ????????????????A HeaderData ?? null ??????
-
LhaHeader
?w?b?_?f?[?^???? ?V??? LhaHeader ?? ?C???X?^???X?????????B- Parameters:
HeaderData
- ?w?b?_?f?[?^encode
- ????????????????????????g?p???? ?G???R?[?h- Throws:
IndexOutOfBoundsException
- ?w?b?_?f?[?^??????????????? ?f?[?^???????????????????u?? HeaderData ???????O????????UnsupportedEncodingException
- encode ???w?????????G???R?[?h?? ?T?|?[?g???????????IllegalArgumentException
- ?w?b?_???x???? 0,1,2,3 ????????????????A HeaderData ?? null ??????
-
-
Method Details
-
clone
?}???I?u?W?F?N?g???R?s?[??????????????B -
getCompressMethod
?f?[?^?????k???????@??????????????????????B- Returns:
- ???k?@?????
-
getOriginalSize
public long getOriginalSize()?f?[?^?????k?O???T?C?Y???????B- Returns:
- ???k?O???T?C?Y
LhaHeader( String path ) ?????? LhaHeader( String path, Date date )?????????? ?C???X?^???X???????????????T?C?Y???s???????? LhaHeader.UNKNOWN( -1 ) ???????B - See Also:
-
getCompressedSize
public long getCompressedSize()?f?[?^?????k?????T?C?Y???????B- Returns:
- ???k?????T?C?Y
LhaHeader( String path ) ?????? LhaHeader( String path, Date date )?????????? ?C???X?^???X???????????????T?C?Y???s???????? LhaHeader.UNKNOWN( -1 ) ???????B - See Also:
-
getLastModified
?f?[?^?????I?X?V???????????B- Returns:
- ?f?[?^?????I?X?V????
-
getHeaderLevel
public int getHeaderLevel()?}???w?b?_???w?b?_???x?????????B- Returns:
- ?w?b?_???x??
-
getPath
?f?[?^?????O?A ?????????f?[?^???t?@?C?????????????????p?X?????????B
?p?X??????????????AWindows ?n?? A: ???????? ?h???C?u????????????????????B
?p?X?f???~?^???? File.separator ???g?p?????B- Returns:
- ?f?[?^?????O?A???????? ?p?X???B
- See Also:
-
getCRC
public int getCRC()?f?[?^??CRC16?l???????B -
getOSID
public byte getOSID()?}???w?b?_????????? OS ???????q???????B- Returns:
- OS???????q
-
getExtraData
protected byte[] getExtraData()???x?? 0 ?w?b?_?A ???x?? 1 ?w?b?_?????? ?t???????????\???????????{?w?b?_?????g??f?[?^???????B- Returns:
- ?g??f?[?^
-
getLevel0DosAttribute
protected byte getLevel0DosAttribute()???x?? 0 ?w?b?_???L?????? DOS ???t?@?C?????????????B- Returns:
- DOS ?? ?t?@?C??????
-
getBytes
public byte[] getBytes()?}??LhaHeader???f?[?^???g?p???? ?w?b?_?f?[?^???????A ???????o?C?g?z?????`???????B
?G???R?[?h???f?t?H???g?????????g?p???????B- Returns:
- ?o?C?g?z?????i?[?????w?b?_?f?[?^
- Throws:
IllegalStateException
-
- ???k?@???????encode???o?C?g?z???? ?????????? 5byte?????????
- ???x??0,1,2?? ?t?@?C????????????????? ?w?b?_????????????????B
- ???x??1,2???????g??w?b?_????????????o??????????B ?????????w?b?_??CRC?i?[??????????B
- ???x??0???O?? CRC ?? ???x??0?w?b?_?? CRC????????????????????????l?????? LhaHeader.NO_CRC( -2 ) ????????????????B
- ???x??0,1??????LastModified??MS-DOS?`?? ???\???????????????????????????????
- ???x??2,3??????LastModified??4?o?C?g?? time_t???\???????????????????????????????
- OriginalSize ???T?C?Y???s???????????????? ???????l?????? LhaHeader.UNKNOWN( -1 )????????????????B
- OriginalSize ?????l??????????
- ???x??0,1,3 ?????? OriginalSize ?? 4byte?l???\??????????l??????????
- CompressedSize ???T?C?Y???s???????????????? ???????l?????? LhaHeader.UNKNOWN( -1 )????????????????B
- CompressedSize ?????l??????????
- ???x??0,1,3 ?????? CompressedSize ?? 4byte?l???\??????????l??????????
- ???x??2??????OriginalSize ?????? CompressedSize?? 4?o?C?g?l???L?????????t?@?C???T?C?Y?w?b?_???K?v?????? ?????g??w?b?_????????????t?@?C???T?C?Y?w?b?_???o???o??????????B
- CRC ??CRC16?l???s???????????????? ???????l?????? LhaHeader.UNKNOWN( -1 )????????????????B
- ?w?b?_???x???? 0,1,2,3 ???O??????????
-
getBytes
?}??LhaHeader???f?[?^???g?p???? ?w?b?_?f?[?^???????A ???????o?C?g?z?????`???????B- Parameters:
encode
- ????????????o???????????g?p???? ?G???R?[?h- Returns:
- ?o?C?g?z?????i?[?????w?b?_?f?[?^
- Throws:
IllegalStateException
-- ???k?@???????encode???o?C?g?z???? ?????????? 5byte?????????
- ???x??0,1,2?? ?t?@?C????????????????? ?w?b?_????????????????B
- ???x??1,2???????g??w?b?_????????????o??????????B ?????????w?b?_??CRC?i?[??????????B
- ???x??0???O?? CRC ?? ???x??0?w?b?_?? CRC????????????????????????l?????? LhaHeader.NO_CRC( -2 ) ????????????????B
- ???x??0,1??????LastModified??MS-DOS?`?? ???\???????????????????????????????
- ???x??2,3??????LastModified??4?o?C?g?? time_t???\???????????????????????????????
- OriginalSize ???T?C?Y???s???????????????? ???????l?????? LhaHeader.UNKNOWN( -1 )????????????????B
- OriginalSize ?????l??????????
- ???x??0,1,3 ?????? OriginalSize ?? 4byte?l???\??????????l??????????
- CompressedSize ???T?C?Y???s???????????????? ???????l?????? LhaHeader.UNKNOWN( -1 )????????????????B
- CompressedSize ?????l??????????
- ???x??0,1,3 ?????? CompressedSize ?? 4byte?l???\??????????l??????????
- ???x??2??????OriginalSize ?????? CompressedSize?? 4?o?C?g?l???L?????????t?@?C???T?C?Y?w?b?_???K?v?????? ?????g??w?b?_????????????t?@?C???T?C?Y?w?b?_???o???o??????????B
- CRC ??CRC16?l???s???????????????? ???????l?????? LhaHeader.UNKNOWN( -1 )????????????????B
- ?w?b?_???x???? 0,1,2,3 ???O??????????
UnsupportedEncodingException
- encode ???w?????????G???R?[?h?? ?T?|?[?g???????????
-
setCompressMethod
???k?@????????????????B- Parameters:
method
- ???k?@?????- Throws:
IllegalArgumentException
- ???k?@??????? '-' ???n?????????????A '-' ???I???????????????B
-
setOriginalSize
public void setOriginalSize(long size) ???k?O?f?[?^?T?C?Y???????????B
LhaHeader.UNKNOWN( -1 ) ?? ?T?C?Y?s???????? ????????????????????????????????B
???? ???x??0,1,3 ?????????????????? 4?o?C?g?l?????????????? 4?o?C?g???\??????????l?????????????? getByte() ???????O????????B- Parameters:
size
- ???k?O?f?[?^?T?C?Y- Throws:
IllegalArgumentException
- size ?? LhaHeader.UNKNOWN( -1 )??????????????????????- See Also:
-
setCompressedSize
public void setCompressedSize(long size) ???k???f?[?^?T?C?Y???????????B
LhaHeader.UNKNOWN( -1 ) ?? ?T?C?Y?s???????? ????????????????????????????????B
???? ???x??0,1,3 ?????????????????? 4?o?C?g?l?????????????? 4?o?C?g???\??????????l?????????????? getByte() ???????O????????B- Parameters:
size
- ???k???f?[?^?T?C?Y- Throws:
IllegalArgumentException
- size ?? LhaHeader.UNKNOWN ??????????????????- See Also:
-
setLastModified
???k?f?[?^?????I?X?V???????????????B
?w?b?_???x???? 0,1 ???????? MsdosDate???\???????????A ?w?b?_???x???? 2,3 ???????? 4byte ?? time_t???\?????????? ?????t??????????????????B
???????????????? ?}?????\?b?h?????O?????????}?????????? ???}???B????????????????? ?}?????\?b?h?????O???????????A getBytes() ???????O????????B- Parameters:
date
- ???I?X?V????- Throws:
IllegalArgumentException
- date ?? null ??????????????????????
-
setHeaderLevel
public void setHeaderLevel(int level) ?w?b?_???x?????????????B
?????????????????? 0,1,2,3 ????????????????B
?w?b?_???x???????X???p?X???????????ALastModified ????????? ???????????????????????????K?v???????B- Parameters:
level
- ?w?b?_???x??
-
setPath
?f?[?^?????O?A?????????f?[?^???t?@?C?????????????A ?f?[?^???p?X???????????B
?p?X?f???~?^???? File.separator ???g?p?????B
?w?b?_???x?????????? path ?????o?C?g???????????????????A ?}?????\?b?h????????z???????????? ???O?????????}???? ?????B??????z?????????? ?}?????\?b?h?????O???????????A getBytes()???????O???????- Parameters:
path
- ?f?[?^?????O?A?????????t?@?C????- Throws:
IllegalArgumentException
- path ???????????????????- See Also:
-
setCRC
public void setCRC(int crc) ???k?O???f?[?^?? CRC16?l???????????B
LhaHeader.UNKNOWN( -1 ) ?? ?T?C?Y?s???????? ????????????????????????????????B
LhaHeader.NO_CRC( -2 ) ?? ???x??0?w?b?_???? ???? CRC?l???o????????}???????????????????l ???????B
?????w?b?_???x???????? LhaHeader.NO_CRC( -2 ) ???????????????O?????????? getBytes() ???? ???O????????????????????}???B
?L????????????2?o?C?g???A????2?o?C?g?????????????B- Parameters:
crc
- ?f?[?^?????k?O??CRC16?l- Throws:
IllegalArgumentException
- crc ?? LhaHeader.UNKNOWN ??????????????????- See Also:
-
setOSID
public void setOSID(byte id) ?}???w?b?_??OS???L?????????????????????A ?????f?[?^???????????????????????? OS???????q???????????B- Parameters:
id
- OS?????q
-
setExtraData
protected void setExtraData(byte[] data) ???x?? 0,1?w?b?_?????g?p?????? ???{?w?b?_?? ?g????????????????B
?g????????o?C?g?????????????????????A?}?????\?b?h?? ??????z?????????O?????????}?????????B??????z???????? getBytes()???????O????????B- Parameters:
data
- ?g????? ?g????????o????????????? null???????????B
-
setLevel0DosAttribute
protected void setLevel0DosAttribute(byte attribute) ???x?? 0?w?b?_?????????o?????????A MS-DOS ???t?@?C?????????????????B- Parameters:
attribute
- MS-DOS???t?@?C??????
-
importExtendHeader
protected void importExtendHeader(byte[] HeaderData, int index, int length, String encode) throws UnsupportedEncodingException ?g??w?b?_???????????B ?}?????\?b?h???I?[?o?[???C?h?????????????? ?l?X???g??w?b?_???????????}???????\???????B LhaHeader ???? ?g??w?b?_?? private ?????o?????? ExtraExtHeaders ???o?^???????????????B- Parameters:
HeaderData
- ?w?b?_?f?[?^index
- HeaderData?????g??w?b?_???J?n???ulength
- ?g??w?b?_??????encode
- ????????????????????????g?p???? ?G???R?[?h- Throws:
UnsupportedEncodingException
- encode ???w?????????G???R?[?h?? ?T?|?[?g???????????
-
exportExtendHeaders
?g??w?b?_???o?C?g?z?????`???????o???????B ?}?????\?b?h???I?[?o?[???C?h?????????????? ?l?X???g??w?b?_???????????}???????\???????B LhaHeader ???? private ?????o?????? ExtraExtHeaders ???o?^???????g??w?b?_???????? ???????????????B ?o?????`???? ?????o?C?g?????g??w?b?_?????q ?}????A?g??w?b?_?f?[?^???i?[?????A ?????g??w?b?_???????????Y?t????????B- Parameters:
encode
- ????????????o???????????g?p???? ?G???R?[?h- Returns:
- 1?????g??w?b?_??1?????o?C?g?z?????i?[???A ???????z?????`??????????
- Throws:
UnsupportedEncodingException
- encode ???w?????????G???R?[?h?? ?T?|?[?g???????????
-
checkHeaderData
public static boolean checkHeaderData(byte[] HeaderData) ?w?b?_?f?[?^?????????????????`?F?b?N?????B- Parameters:
HeaderData
- ?w?b?_?f?[?^???o?C?g?z?????i?[????????- Returns:
- ?w?b?_?f?[?^?????????????? true ?????? false
-
getFirstHeaderData
?????X?g???[?????? ???????w?b?_???????????B
?}?????\?b?h?????x??1?w?b?_?A???????? ???x??3?w?b?_?? ?????f?[?^????????????A?w?b?_?S???????????????????? in.mark( 65536 ) ?? ???E???L???? ???????????\?????????A ???????? reset() ???????? ?????????f?[?^???????????? ???\?????????B
?????AInputStream ??mark/reset ?????????????? ?X?g???[???I?[?t???? ?w?b?_???????f?[?^??????????? ?w?b?_???S?????????????????? EndOfStream???B??????????A reset()???????? ?????????f?[?^???????????????\?????????B- Parameters:
in
- ?w?b?_?f?[?^???????????????X?g???[?? ?X?g???[???? mark/reset???T?|?[?g???K?v???????B- Returns:
- ?????????????w?b?_?f?[?^
?w?b?_?????????????? EndOfStream ???B?????????? null - Throws:
IOException
- ???o???G???[?????????????IllegalArgumentException
- in ?? mark/reset???T?|?[?g?????????
-
getNextHeaderData
?????X?g???[?????? ?????w?b?_???????????B
?}?????\?b?h?????x??1?w?b?_?A???????? ???x??3?w?b?_?? ?????f?[?^????????????A?w?b?_?S???????????????????? in.mark( 65536 ) ?? ???E???L???? ???????????\?????????A ???????? reset() ???????? ?????????f?[?^???????????? ???\?????????B
?????A?X?g???[???I?[?t???? ?w?b?_???????f?[?^????????? ?? ?w?b?_???S?????????????????? EndOfStream???B??????????A reset()???????? ?????????f?[?^???????????????\?????????B- Parameters:
in
- ?w?b?_?f?[?^???????????????X?g???[?? ?X?g???[???? mark/reset???T?|?[?g???K?v???????B- Returns:
- ?????????????w?b?_?f?[?^
?w?b?_?????????????? EndOfStream ???B?????????? null - Throws:
IOException
- ???o???G???[?????????????IllegalArgumentException
- in ?? mark/reset???T?|?[?g?????????
-
createInstance
property ?? ?L?["lha.header" ???????t???????????????g?p???? HeaderData ???? LhaHeader ???C???X?^???X?????????B- Parameters:
HeaderData
- ?w?b?_???f?[?^???????o?C?g?z??property
- LhaProperty.parse() ?? LhaHeader ???C???X?^???X???????????????? ?????? ?L?["lha.header" ???l???????????v???p?e?B- Returns:
- LhaHeader ???C???X?^???X
-