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:
java.io.Closeable
,java.lang.AutoCloseable
public class LhaInputStream extends java.io.InputStream
???}???????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
-- 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
Constructors Constructor Description LhaInputStream(java.io.InputStream in)
in ???? LHA???????f?[?^?????????? InputStream ???\?z?????B
?e???k?`?????????????????????????????????v???p?e?B???? LhaProperty.getProperties() ???????????v???p?e?B???g?p???????BLhaInputStream(java.io.InputStream in, java.util.Properties property)
in ???? LHA???????f?[?^?????????? InputStream???\?z?????B
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
available()
?????????????????G???g?????I?[???B?????????????B
?u???b?N??????????????????f?[?^????????????????????????}???Bvoid
close()
?}???????X?g???[????????A?g?p??????? ?S???????\?[?X???J???????Bvoid
closeEntry()
?????????????????G???g????????A ?????G???g?????????}???????????X?g???[?????????????BLhaHeader
getNextEntry()
?????G???g?????????????????????}?????????X?g???[?????????????BLhaHeader
getNextEntryWithoutExtract()
?????G???g????????????????????}?????????X?g???[?????????????Bvoid
mark(int readLimit)
?????????????????G???g???????????u???}?[?N?????????A reset() ???}?[?N???????????????u???????????????????Bboolean
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 ???????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???????????B
-
-
-
Constructor Detail
-
LhaInputStream
public LhaInputStream(java.io.InputStream in)
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:
LhaProperty.getProperties()
-
LhaInputStream
public LhaInputStream(java.io.InputStream in, java.util.Properties property) throws java.io.UnsupportedEncodingException
in ???? LHA???????f?[?^?????????? InputStream???\?z?????B- Parameters:
in
- LHA?????`?????f?[?^???????????????X?g???[??property
- ?e???k?`?????????????????????????????????????v???p?e?B- Throws:
java.io.UnsupportedEncodingException
- property.getProperty( "lha.encoding" ) ?????????? ?G???R?[?f?B???O?????T?|?[?g???????????
-
-
Method Detail
-
read
public int read() throws java.io.IOException
???????G???g?????? 1?o?C?g???f?[?^???????????B- Specified by:
read
in classjava.io.InputStream
- Returns:
- ?????}?????? 1?o?C?g???f?[?^?B
?????G???g?????I?[???B?????????? -1 - Throws:
java.io.IOException
- ?????????????????G???g????????? ???o???G???[?????????????
-
read
public int read(byte[] buffer) throws java.io.IOException
???????G???g?????? buffer ???????????????f?[?^???????????B- Overrides:
read
in classjava.io.InputStream
- Parameters:
buffer
- ?f?[?^???????????o?b?t?@- Returns:
- ?????}???????f?[?^?????B
?????G???g?????I?[???B?????????? -1?B - Throws:
java.io.IOException
- ?????????????????G???g????????? ???o???G???[?????????????
-
read
public int read(byte[] buffer, int index, int length) throws java.io.IOException
???????G???g?????? buffer ??index?? length?o?C?g?? ?f?[?^?????????????B- Overrides:
read
in classjava.io.InputStream
- Parameters:
buffer
- ?f?[?^???????????o?b?t?@index
- buffer?????f?[?^?????????J?n???ulength
- ?????????f?[?^??- Returns:
- ?????}???????f?[?^?????B
?????G???g?????I?[???B?????????? -1?B - Throws:
java.io.IOException
- ?????????????????G???g????????? ???o???G???[?????????????
-
skip
public long skip(long length) throws java.io.IOException
???????G???g?????f?[?^?? length ?o?C?g???????????B- Overrides:
skip
in classjava.io.InputStream
- Parameters:
length
- ???????????f?[?^??- Returns:
- ???????????????????f?[?^??
- Throws:
java.io.IOException
- ?????????????????G???g????????? ???o???G???[?????????????
-
mark
public void mark(int readLimit)
?????????????????G???g???????????u???}?[?N?????????A reset() ???}?[?N???????????????u???????????????????B- Overrides:
mark
in classjava.io.InputStream
- Parameters:
readLimit
- ?}?[?N???u???????????E???????????B ?}???o?C?g?????L?????f?[?^???????????????? reset() ????????????????B- Throws:
java.lang.IllegalStateException
- ?????????????????G???g???????????
-
reset
public void reset() throws java.io.IOException
?????????????????G???g???????????????u???????? mark() ???\?b?h???????o???????????????u???????????B- Overrides:
reset
in classjava.io.InputStream
- Throws:
java.io.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 classjava.io.InputStream
- Returns:
- ???? true
-
available
public int available() throws java.io.IOException
?????????????????G???g?????I?[???B?????????????B
?u???b?N??????????????????f?[?^????????????????????????}???B- Overrides:
available
in classjava.io.InputStream
- Returns:
- ?????????????????G???g?????I?[???B???????? 0 ?B???????????? 1
- Throws:
java.io.IOException
- ?????????????????G???g????????? ???o???G???[?????????????- See Also:
ZipInputStream.available()
-
close
public void close() throws java.io.IOException
?}???????X?g???[????????A?g?p??????? ?S???????\?[?X???J???????B- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjava.io.InputStream
- Throws:
java.io.IOException
- ???o???G???[?????????????
-
getNextEntry
public LhaHeader getNextEntry() throws java.io.IOException
?????G???g?????????????????????}?????????X?g???[?????????????B- Returns:
- ?G???g?????????????? LhaHeader
- Throws:
java.io.IOException
- ???o???G???[?????????????
-
getNextEntryWithoutExtract
public LhaHeader getNextEntryWithoutExtract() throws java.io.IOException
?????G???g????????????????????}?????????X?g???[?????????????B- Returns:
- ?G???g?????????????? LhaHeader
- Throws:
java.io.IOException
- ???o???G???[?????????????
-
closeEntry
public void closeEntry() throws java.io.IOException
?????????????????G???g????????A ?????G???g?????????}???????????X?g???[?????????????B- Throws:
java.io.IOException
- ???o???G???[?????????????
-
-