Package jp.gr.java_conf.dangan.util.lha
Class LhaOutputStream
java.lang.Object
java.io.OutputStream
jp.gr.java_conf.dangan.util.lha.LhaOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
???}???????X?g???[???? ???k?f?[?^???o???????????????[?e?B???e?B?N???X?B
java.util.zip.ZipOutputStream ???????C???^?[?t?F?C?X???????????????????B Zip??????ALHA???o?????{?? 2?p?X???????????A1?????G???g???????k?????????A ?G???g???S?????f?[?^???????????L?????????K?v???????B ???????????L?????????g?p??????????????? LhaRetainedOutputStream ?? LhaImmediateOutputStream ???g?p???????B
java.util.zip.ZipOutputStream ???????C???^?[?t?F?C?X???????????????????B Zip??????ALHA???o?????{?? 2?p?X???????????A1?????G???g???????k?????????A ?G???g???S?????f?[?^???????????L?????????K?v???????B ???????????L?????????g?p??????????????? LhaRetainedOutputStream ?? LhaImmediateOutputStream ???g?p???????B
-- revision history -- $Log: LhaOutputStream.java,v $ Revision 1.1.2.2 2005/05/03 07:48:40 dangan [bug fix] ???k?@?????q -lhd- ???w?????????A???k???T?C?Y???I???W?i???T?C?Y????????????????A ?K?? -lh0- ??????????????????B?????????f?B???N?g?????????i?[?????????????B Revision 1.1.2.1 2005/04/29 02:14:28 dangan [bug fix] ???k?@?????q -lhd- ???w?????????A???k???T?C?Y???I???W?i???T?C?Y????????????????A ?K?? -lh0- ??????????????????B?????????f?B???N?g?????????i?[?????????????B Revision 1.1 2002/12/08 00:00:00 dangan [maintenance] LhaConstants ???? CompressMethod ?????N???X???????X???????????C???B Revision 1.0 2002/08/05 00:00:00 dangan add to version control [change] ?R???X?g???N?^???? ?????? String encode ?????????????p?~?A Properties ???????????????????????B [maintenance] ?\?[?X???? ?^?u?p?~ ???C?Z???X????C??
- Version:
- $Revision: 1.1.2.2 $
- Author:
- $Author: dangan $
-
Constructor Summary
ConstructorsConstructorDescriptionout ?? ???k?f?[?^???o??????OutputStream???\?z?????B
?????????@?\???????????g?p?????B?}???????A ???k???f?[?^???????????????L???????????t?@?C???????k????????B
?e???k?`?????????????????????????????????v???p?e?B???? LhaProperty.getProperties() ???????????v???p?e?B???g?p???????BLhaOutputStream
(OutputStream out, RandomAccessFile file) out ?? ???k?f?[?^???o??????OutputStream???\?z?????B
?e???k?`?????????????????????????????????v???p?e?B???? LhaProperty.getProperties() ???????????v???p?e?B???g?p???????BLhaOutputStream
(OutputStream out, RandomAccessFile file, Properties property) out ?? ???k?f?[?^???o??????OutputStream???\?z?????BLhaOutputStream
(OutputStream out, Properties property) out ?? ???k?f?[?^???o??????OutputStream???\?z?????B
?????????@?\???????????g?p?????B?}???????A ???k???f?[?^???????????????L???????????t?@?C???????k????????B -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
?o???????S?????f?[?^???o?????A ?X?g???[??????????Bvoid
?????o???????G???g????????A?????G???g?????o?????\?????????????B ???k?????s????(???k???T?C?Y?????k?O?T?C?Y??????????)?????A ???????????k???i?[?????B?G???g?????T?C?Y????????????A ?}???????????????????????????????Bvoid
flush()
flush ???????????????s???B ???????????????????????G???g?????f?[?^?? ?????????@?\???????}?????????w???????B ?}???? PostLzssDecoder?ALzssOutputStream ???K?????N?? flush() ???????????????? ????f?[?^???o??????????????????????B ?????????? ???????o?????? flush() ?????Bvoid
putNextEntry
(LhaHeader header) ?V????G???g???????????????????X?g???[?????????????B
?}?????\?b?h?? ???????k???????G???g?????????? putNextEntryAlreadyCompressed(), ????????k???????????????? putNextEntryNotYetCompressed() ???????o???B
???k????????????????????A header.getCompressedSize()
header.getOriginalSize()
header.getCRC()
???????????????? LhaHeader.UNKNOWN ????????????????k?????????????????Bvoid
???????k???????G???g?????????}?????????X?g???[?????????????B
???k???????????A?????????@?\???o?????????o???????o?????????B ???k?????f?[?^????????????A?????o?????????????????Bvoid
????????k???????????G???g?????????}?????????X?g???[?????????????B
header ?? OriginalSize, CompressedSize, CRC???w????????????????????????Bvoid
write
(byte[] buffer) ???????G???g???? buffer?????e???S???????o???Bvoid
write
(byte[] buffer, int index, int length) ???????G???g???? buffer?? index???? length?o?C?g???f?[?^???????o???Bvoid
write
(int data) ???????G???g????1?o?C?g???f?[?^???????}???BMethods inherited from class java.io.OutputStream
nullOutputStream
-
Constructor Details
-
LhaOutputStream
out ?? ???k?f?[?^???o??????OutputStream???\?z?????B
?????????@?\???????????g?p?????B?}???????A ???k???f?[?^???????????????L???????????t?@?C???????k????????B
?e???k?`?????????????????????????????????v???p?e?B???? LhaProperty.getProperties() ???????????v???p?e?B???g?p???????B- Parameters:
out
- ???k?f?[?^???o???????X?g???[??- See Also:
-
LhaOutputStream
out ?? ???k?f?[?^???o??????OutputStream???\?z?????B
?????????@?\???????????g?p?????B?}???????A ???k???f?[?^???????????????L???????????t?@?C???????k????????B- Parameters:
out
- ???k?f?[?^???o???????X?g???[??property
- ?e???k?`?????????????????????????????????????v???p?e?B- See Also:
-
LhaOutputStream
out ?? ???k?f?[?^???o??????OutputStream???\?z?????B
?e???k?`?????????????????????????????????v???p?e?B???? LhaProperty.getProperties() ???????????v???p?e?B???g?p???????B- Parameters:
out
- ???k?f?[?^???o???????X?g???[??file
- RandomAccessFile ???C???X?^???X?B
- ???? close() ?????????????B
- ?R???X?g???N?^?? mode ???? "rw" ?I?v?V???????g?p?????A ?????}?????????}?????o???????????????????C???X?^???X???????}???B
- See Also:
-
LhaOutputStream
out ?? ???k?f?[?^???o??????OutputStream???\?z?????B- Parameters:
out
- ???k?f?[?^???o???????X?g???[??file
- RandomAccessFile ???C???X?^???X?B
- ???? close() ?????????????B
- ?R???X?g???N?^?? mode ???? "rw" ?I?v?V???????g?p?????A ?????}?????????}?????o???????????????????C???X?^???X???????}???B
property
- ?e???k?`?????????????????????????????????????v???p?e?B- Throws:
UnsupportedEncodingException
- encode ???T?|?[?g???????????- See Also:
-
-
Method Details
-
write
???????G???g????1?o?C?g???f?[?^???????}???B- Specified by:
write
in classOutputStream
- Parameters:
data
- ?????}???f?[?^- Throws:
IOException
- ???o???G???[??????????????B
-
write
???????G???g???? buffer?????e???S???????o???B- Overrides:
write
in classOutputStream
- Parameters:
buffer
- ?????o???f?[?^?????????o?C?g?z??- Throws:
IOException
- ???o???G???[??????????????B
-
write
???????G???g???? buffer?? index???? length?o?C?g???f?[?^???????o???B- Overrides:
write
in classOutputStream
- Parameters:
buffer
- ?????o???f?[?^?????????o?C?g?z??index
- buffer?????????o???~???f?[?^???J?n???ulength
- ?f?[?^???o?C?g??- Throws:
IOException
- ???o???G???[??????????????B
-
flush
flush ???????????????s???B ???????????????????????G???g?????f?[?^?? ?????????@?\???????}?????????w???????B ?}???? PostLzssDecoder?ALzssOutputStream ???K?????N?? flush() ???????????????? ????f?[?^???o??????????????????????B ?????????? ???????o?????? flush() ?????B- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
- ???o???G???[?????????????- See Also:
-
close
?o???????S?????f?[?^???o?????A ?X?g???[??????????B- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
- ???o???G???[?????????????
-
putNextEntry
?V????G???g???????????????????X?g???[?????????????B
?}?????\?b?h?? ???????k???????G???g?????????? putNextEntryAlreadyCompressed(), ????????k???????????????? putNextEntryNotYetCompressed() ???????o???B
???k????????????????????A- header.getCompressedSize()
- header.getOriginalSize()
- header.getCRC()
- Parameters:
header
- ?????}???G???g????????????????????? LhaHeader???C???X?^???X?B- Throws:
IOException
- ???o???G???[?????????????
- header.getCompressedSize()
-
putNextEntryAlreadyCompressed
???????k???????G???g?????????}?????????X?g???[?????????????B
???k???????????A?????????@?\???o?????????o???????o?????????B ???k?????f?[?^????????????A?????o?????????????????B- Parameters:
header
- ?????}???G???g????????????????????? LhaHeader???C???X?^???X?B- Throws:
IOException
- ???o???G???[?????????????IllegalArgumentException
-- header.getOriginalSize() ?? LhaHeader.UNKNOWN ??????????
- header.getComressedSize() ?? LhaHeader.UNKNOWN ??????????
- header.getCRC() ?? LhaHeader.UNKNOWN ??????????
-
putNextEntryNotYetCompressed
????????k???????????G???g?????????}?????????X?g???[?????????????B
header ?? OriginalSize, CompressedSize, CRC???w????????????????????????B- Parameters:
header
- ?????}???G???g????????????????????? LhaHeader???C???X?^???X?B- Throws:
IOException
- ???o???G???[?????????????
-
closeEntry
?????o???????G???g????????A?????G???g?????o?????\?????????????B ???k?????s????(???k???T?C?Y?????k?O?T?C?Y??????????)?????A ???????????k???i?[?????B?G???g?????T?C?Y????????????A ?}???????????????????????????????B- Throws:
IOException
- ???o???G???[?????????????
-