Class LhaHeader

java.lang.Object
jp.gr.java_conf.dangan.util.lha.LhaHeader
All Implemented Interfaces:
Cloneable

public class LhaHeader extends Object implements 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
 -- 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

    Fields
    Modifier and Type
    Field
    Description
    static final int
    CRC?l??????????????????l?B ???x??0?w?b?_??CRC?l???????????????????????B
    static final int
    ?s?????????????l?B LhaHeader.getCRC(), LhaHeader.getCompressedSize(), LhaHeader.getOriginalSzie() ???}???l?????????????? ?????O?????????A?????l???s?????????????????B
  • Constructor Summary

    Constructors
    Constructor
    Description
    LhaHeader(byte[] HeaderData)
    ?w?b?_?f?[?^???? ?V??? LhaHeader ?? ?C???X?^???X?????????B
    ?G???R?[?h?? LhaUtil.DefaultEncode ???g?p???????B
    LhaHeader(byte[] HeaderData, String encode)
    ?w?b?_?f?[?^???? ?V??? LhaHeader ?? ?C???X?^???X?????????B
    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
    LhaHeader(String path, Date date)
    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
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    checkHeaderData(byte[] HeaderData)
    ?w?b?_?f?[?^?????????????????`?F?b?N?????B
    ?}???I?u?W?F?N?g???R?s?[??????????????B
    static LhaHeader
    createInstance(byte[] HeaderData, Properties property)
    property ?? ?L?["lha.header" ???????t???????????????g?p???? HeaderData ???? LhaHeader ???C???X?^???X?????????B
    protected byte[][]
    ?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
    byte[]
    ?}??LhaHeader???f?[?^???g?p???? ?w?b?_?f?[?^???????A ???????o?C?g?z?????`???????B
    ?G???R?[?h???f?t?H???g?????????g?p???????B
    byte[]
    getBytes(String encode)
    ?}??LhaHeader???f?[?^???g?p???? ?w?b?_?f?[?^???????A ???????o?C?g?z?????`???????B
    long
    ?f?[?^?????k?????T?C?Y???????B
    ?f?[?^?????k???????@??????????????????????B
    int
    ?f?[?^??CRC16?l???????B
    protected byte[]
    ???x?? 0 ?w?b?_?A ???x?? 1 ?w?b?_?????? ?t???????????\???????????{?w?b?_?????g??f?[?^???????B
    static 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?[?^???????????????\?????????B
    int
    ?}???w?b?_???w?b?_???x?????????B
    ?f?[?^?????I?X?V???????????B
    protected byte
    ???x?? 0 ?w?b?_???L?????? DOS ???t?@?C?????????????B
    static 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?[?^???????????????\?????????B
    long
    ?f?[?^?????k?O???T?C?Y???????B
    byte
    ?}???w?b?_????????? OS ???????q???????B
    ?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
    protected 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?^???????????????B
    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
    void
    ???k?@????????????????B
    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
    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
    void
    setHeaderLevel(int level)
    ?w?b?_???x?????????????B
    ?????????????????? 0,1,2,3 ????????????????B
    ?w?b?_???x???????X???p?X???????????ALastModified ????????? ???????????????????????????K?v???????B
    void
    ???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
    protected void
    setLevel0DosAttribute(byte attribute)
    ???x?? 0?w?b?_?????????o?????????A MS-DOS ???t?@?C?????????????????B
    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
    void
    setOSID(byte id)
    ?}???w?b?_??OS???L?????????????????????A ?????f?[?^???????????????????????? OS???????q???????????B
    void
    ?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???????

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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_CRC
      CRC?l??????????????????l?B ???x??0?w?b?_??CRC?l???????????????????????B
      See Also:
  • Constructor Details

    • LhaHeader

      public LhaHeader(String path)
      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

      public LhaHeader(String path, Date date)
      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

      public LhaHeader(byte[] HeaderData, String encode) throws UnsupportedEncodingException
      ?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

      public Object clone()
      ?}???I?u?W?F?N?g???R?s?[??????????????B
      Overrides:
      clone in class Object
      Returns:
      ?}???I?u?W?F?N?g???R?s?[
    • getCompressMethod

      public String 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

      public Date 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

      public String 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
      Returns:
      ?f?[?^??CRC16?l
      LhaHeader( String path ) ?????? LhaHeader( String path, Date date )?????????? ?C???X?^???X??????????????CRC???s???????? LhaHeader.UNKNOWN( -1 ) ???????B
      ???x??0?w?b?_??CRC16?l?? ?t?B?[???h??????????? LhaHeader.NO_CRC( -2 )??????
      See Also:
    • 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 -
      1. ???k?@???????encode???o?C?g?z???? ?????????? 5byte?????????
      2. ???x??0,1,2?? ?t?@?C????????????????? ?w?b?_????????????????B
      3. ???x??1,2???????g??w?b?_????????????o??????????B ?????????w?b?_??CRC?i?[??????????B
      4. ???x??0???O?? CRC ?? ???x??0?w?b?_?? CRC????????????????????????l?????? LhaHeader.NO_CRC( -2 ) ????????????????B
      5. ???x??0,1??????LastModified??MS-DOS?`?? ???\???????????????????????????????
      6. ???x??2,3??????LastModified??4?o?C?g?? time_t???\???????????????????????????????
      7. OriginalSize ???T?C?Y???s???????????????? ???????l?????? LhaHeader.UNKNOWN( -1 )????????????????B
      8. OriginalSize ?????l??????????
      9. ???x??0,1,3 ?????? OriginalSize ?? 4byte?l???\??????????l??????????
      10. CompressedSize ???T?C?Y???s???????????????? ???????l?????? LhaHeader.UNKNOWN( -1 )????????????????B
      11. CompressedSize ?????l??????????
      12. ???x??0,1,3 ?????? CompressedSize ?? 4byte?l???\??????????l??????????
      13. ???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
      14. CRC ??CRC16?l???s???????????????? ???????l?????? LhaHeader.UNKNOWN( -1 )????????????????B
      15. ?w?b?_???x???? 0,1,2,3 ???O??????????
      ?????????B
    • getBytes

      public byte[] getBytes(String encode) throws UnsupportedEncodingException
      ?}??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 -
      1. ???k?@???????encode???o?C?g?z???? ?????????? 5byte?????????
      2. ???x??0,1,2?? ?t?@?C????????????????? ?w?b?_????????????????B
      3. ???x??1,2???????g??w?b?_????????????o??????????B ?????????w?b?_??CRC?i?[??????????B
      4. ???x??0???O?? CRC ?? ???x??0?w?b?_?? CRC????????????????????????l?????? LhaHeader.NO_CRC( -2 ) ????????????????B
      5. ???x??0,1??????LastModified??MS-DOS?`?? ???\???????????????????????????????
      6. ???x??2,3??????LastModified??4?o?C?g?? time_t???\???????????????????????????????
      7. OriginalSize ???T?C?Y???s???????????????? ???????l?????? LhaHeader.UNKNOWN( -1 )????????????????B
      8. OriginalSize ?????l??????????
      9. ???x??0,1,3 ?????? OriginalSize ?? 4byte?l???\??????????l??????????
      10. CompressedSize ???T?C?Y???s???????????????? ???????l?????? LhaHeader.UNKNOWN( -1 )????????????????B
      11. CompressedSize ?????l??????????
      12. ???x??0,1,3 ?????? CompressedSize ?? 4byte?l???\??????????l??????????
      13. ???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
      14. CRC ??CRC16?l???s???????????????? ???????l?????? LhaHeader.UNKNOWN( -1 )????????????????B
      15. ?w?b?_???x???? 0,1,2,3 ???O??????????
      ?????????B
      UnsupportedEncodingException - encode ???w?????????G???R?[?h?? ?T?|?[?g???????????
    • setCompressMethod

      public void setCompressMethod(String method)
      ???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

      public void 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????????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

      public void setPath(String path)
      ?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???u
      length - ?g??w?b?_??????
      encode - ????????????????????????g?p???? ?G???R?[?h
      Throws:
      UnsupportedEncodingException - encode ???w?????????G???R?[?h?? ?T?|?[?g???????????
    • exportExtendHeaders

      protected byte[][] exportExtendHeaders(String encode) throws UnsupportedEncodingException
      ?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

      public static byte[] getFirstHeaderData(InputStream in) throws IOException
      ?????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

      public static byte[] getNextHeaderData(InputStream in) throws IOException
      ?????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

      public static LhaHeader createInstance(byte[] HeaderData, Properties property)
      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