Package jp.gr.java_conf.dangan.util.lha
Class LhaInputStream
java.lang.Object
java.io.InputStream
jp.gr.java_conf.dangan.util.lha.LhaInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
???}???????X?g???[??????LHA?????f?[?^???????}???A
?G???g???????????????????????????????[?e?B???e?B?N???X?B
java.util.zip.ZipInputStream ???????C???^?[?t?F?C?X???????????????????B
?????????????????????????????????G???g?????~?? ???????????G???g???????????????}????????\?????????B
java.util.zip.ZipInputStream ???????C???^?[?t?F?C?X???????????????????B
?????????????????????????????????G???g?????~?? ???????????G???g???????????????}????????\?????????B
-- revision history -- $Log: LhaInputStream.java,v $ Revision 1.1.2.1 2003/07/20 13:22:31 dangan [bug fix] getNextEntry() ?? CompressMethod.connectDecoder ?? this.limit ???n???~?????}???? this.in ???n????????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 ?????I?[???B????????????????????????????????????C???B available() ???U??????? java.util.zip.ZipInputStream ??????????? ?G???g?????I?[???B?????????????? 1 ?G???g?????I?[???B?????????? 0 ???????????????X?B [maintenance] ?\?[?X???? ?^?u?p?~ ???C?Z???X????C??
- Version:
- $Revision: 1.1.2.1 $
- Author:
- $Author: dangan $
-
Constructor Summary
ConstructorsConstructorDescriptionin ???? LHA???????f?[?^?????????? InputStream ???\?z?????B
?e???k?`?????????????????????????????????v???p?e?B???? LhaProperty.getProperties() ???????????v???p?e?B???g?p???????BLhaInputStream
(InputStream in, Properties property) in ???? LHA???????f?[?^?????????? InputStream???\?z?????B -
Method Summary
Modifier and TypeMethodDescriptionint
?????????????????G???g?????I?[???B?????????????B
?u???b?N??????????????????f?[?^????????????????????????}???Bvoid
close()
?}???????X?g???[????????A?g?p??????? ?S???????\?[?X???J???????Bvoid
?????????????????G???g????????A ?????G???g?????????}???????????X?g???[?????????????B?????G???g?????????????????????}?????????X?g???[?????????????B?????G???g????????????????????}?????????X?g???[?????????????Bvoid
mark
(int readLimit) ?????????????????G???g???????????u???}?[?N?????????A reset() ???}?[?N???????????????u???????????????????Bboolean
???}???????????X?g???[???? mark()?? reset()???T?|?[?g?????????????B
?w?b?_???????????? mark/reset ???K?{?????? ?R???X?g???N?^???n?????? in ?? markSupported() ?? false ???????????A?}???N???X?? in ?? mark/reset ???T?|?[?g???? BufferedInputStream ?????b?v?????B ?????????A?}?????\?b?h?????? true ???????Bint
read()
???????G???g?????? 1?o?C?g???f?[?^???????????Bint
read
(byte[] buffer) ???????G???g?????? buffer ???????????????f?[?^???????????Bint
read
(byte[] buffer, int index, int length) ???????G???g?????? buffer ??index?? length?o?C?g?? ?f?[?^?????????????Bvoid
reset()
?????????????????G???g???????????????u???????? mark() ???\?b?h???????o???????????????u???????????Blong
skip
(long length) ???????G???g?????f?[?^?? length ?o?C?g???????????BMethods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
LhaInputStream
in ???? LHA???????f?[?^?????????? InputStream ???\?z?????B
?e???k?`?????????????????????????????????v???p?e?B???? LhaProperty.getProperties() ???????????v???p?e?B???g?p???????B- Parameters:
in
- LHA?????`?????f?[?^???????????????X?g???[??- See Also:
-
LhaInputStream
in ???? LHA???????f?[?^?????????? InputStream???\?z?????B- Parameters:
in
- LHA?????`?????f?[?^???????????????X?g???[??property
- ?e???k?`?????????????????????????????????????v???p?e?B- Throws:
UnsupportedEncodingException
- property.getProperty( "lha.encoding" ) ?????????? ?G???R?[?f?B???O?????T?|?[?g???????????
-
-
Method Details
-
read
???????G???g?????? 1?o?C?g???f?[?^???????????B- Specified by:
read
in classInputStream
- Returns:
- ?????}?????? 1?o?C?g???f?[?^?B
?????G???g?????I?[???B?????????? -1 - Throws:
IOException
- ?????????????????G???g????????? ???o???G???[?????????????
-
read
???????G???g?????? buffer ???????????????f?[?^???????????B- Overrides:
read
in classInputStream
- Parameters:
buffer
- ?f?[?^???????????o?b?t?@- Returns:
- ?????}???????f?[?^?????B
?????G???g?????I?[???B?????????? -1?B - Throws:
IOException
- ?????????????????G???g????????? ???o???G???[?????????????
-
read
???????G???g?????? buffer ??index?? length?o?C?g?? ?f?[?^?????????????B- Overrides:
read
in classInputStream
- Parameters:
buffer
- ?f?[?^???????????o?b?t?@index
- buffer?????f?[?^?????????J?n???ulength
- ?????????f?[?^??- Returns:
- ?????}???????f?[?^?????B
?????G???g?????I?[???B?????????? -1?B - Throws:
IOException
- ?????????????????G???g????????? ???o???G???[?????????????
-
skip
???????G???g?????f?[?^?? length ?o?C?g???????????B- Overrides:
skip
in classInputStream
- Parameters:
length
- ???????????f?[?^??- Returns:
- ???????????????????f?[?^??
- Throws:
IOException
- ?????????????????G???g????????? ???o???G???[?????????????
-
mark
public void mark(int readLimit) ?????????????????G???g???????????u???}?[?N?????????A reset() ???}?[?N???????????????u???????????????????B- Overrides:
mark
in classInputStream
- Parameters:
readLimit
- ?}?[?N???u???????????E???????????B ?}???o?C?g?????L?????f?[?^???????????????? reset() ????????????????B- Throws:
IllegalStateException
- ?????????????????G???g???????????
-
reset
?????????????????G???g???????????????u???????? mark() ???\?b?h???????o???????????????u???????????B- Overrides:
reset
in classInputStream
- Throws:
IOException
- ?????????????????G???g????????? ???o???G???[?????????????
-
markSupported
public boolean markSupported()???}???????????X?g???[???? mark()?? reset()???T?|?[?g?????????????B
?w?b?_???????????? mark/reset ???K?{?????? ?R???X?g???N?^???n?????? in ?? markSupported() ?? false ???????????A?}???N???X?? in ?? mark/reset ???T?|?[?g???? BufferedInputStream ?????b?v?????B ?????????A?}?????\?b?h?????? true ???????B- Overrides:
markSupported
in classInputStream
- Returns:
- ???? true
-
available
?????????????????G???g?????I?[???B?????????????B
?u???b?N??????????????????f?[?^????????????????????????}???B- Overrides:
available
in classInputStream
- Returns:
- ?????????????????G???g?????I?[???B???????? 0 ?B???????????? 1
- Throws:
IOException
- ?????????????????G???g????????? ???o???G???[?????????????- See Also:
-
close
?}???????X?g???[????????A?g?p??????? ?S???????\?[?X???J???????B- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
- ???o???G???[?????????????
-
getNextEntry
?????G???g?????????????????????}?????????X?g???[?????????????B- Returns:
- ?G???g?????????????? LhaHeader
- Throws:
IOException
- ???o???G???[?????????????
-
getNextEntryWithoutExtract
?????G???g????????????????????}?????????X?g???[?????????????B- Returns:
- ?G???g?????????????? LhaHeader
- Throws:
IOException
- ???o???G???[?????????????
-
closeEntry
?????????????????G???g????????A ?????G???g?????????}???????????X?g???[?????????????B- Throws:
IOException
- ???o???G???[?????????????
-