Package jp.gr.java_conf.dangan.util.lha
Class LhaFile
- java.lang.Object
-
- jp.gr.java_conf.dangan.util.lha.LhaFile
-
public class LhaFile extends java.lang.Object
LHA?????t?@?C???????G???g???f?[?^???????o?? InputStream???????????????[?e?B???e?B?N???X?B
java.util.zip.ZipFile ?????? ?C???^?[?t?F?C?X???????????????????B CRC16?????????`?F?b?N???s??????B-- revision history -- $Log: LhaFile.java,v $ 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 [improvement] ?G???g?????????? Hashtable ???g?p?????????????? ???????G???g???????????????G???g???J?n???u?? ??????????????????????????????B [change] ?R???X?g???N?^???? ?????? String encode ?????????????p?~?A Properties ???????????????????????B [maintanance] ?\?[?X???? ?^?u?p?~ ???C?Z???X????C??
- Version:
- $Revision: 1.1 $
- Author:
- $Author: dangan $
-
-
Constructor Summary
Constructors Constructor Description LhaFile(java.io.File filename)
filename ???w?????????t?@?C???????????f?[?^???????}??LhaFile???\?z?????B
?e???k?`?????????????????????????????????v???p?e?B???? LhaProperty.getProperties() ???????????v???p?e?B???g?p???????BLhaFile(java.io.File filename, java.util.Properties property)
filename ???w?????????t?@?C???????????f?[?^???????}?? LhaFile ???\?z?????BLhaFile(java.io.RandomAccessFile file)
file ???w?????????t?@?C???????????f?[?^???????}?? LhaFile ???\?z?????B
?e???k?`?????????????????????????????????v???p?e?B???? LhaProperty.getProperties() ???????????v???p?e?B???g?p???????BLhaFile(java.io.RandomAccessFile file, boolean rescueMode)
file ???w?????????t?@?C???????????f?[?^???????}?? LhaFile ???\?z?????B
?e???k?`?????????????????????????????????v???p?e?B???? LhaProperty.getProperties() ???????????v???p?e?B???g?p???????BLhaFile(java.io.RandomAccessFile file, java.util.Properties property)
file ???w?????????t?@?C???????????f?[?^???????}?? LhaFile ???\?z?????BLhaFile(java.io.RandomAccessFile file, java.util.Properties property, boolean rescueMode)
file ???w?????????t?@?C???????????f?[?^???????}?? LhaFile ???\?z?????BLhaFile(java.lang.String filename)
filename ???w?????????t?@?C???????????f?[?^???????}??LhaFile???\?z?????B
?e???k?`?????????????????????????????????v???p?e?B???? LhaProperty.getProperties() ???????????v???p?e?B???g?p???????BLhaFile(java.lang.String filename, java.util.Properties property)
filename ???w?????????t?@?C???????????f?[?^???????}??LhaFile???\?z?????B
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
?}?? LHA?????t?@?C??????????B ???????A?}??LhaFile?????s?????S???? InputStream??????I????????????Bjava.util.Enumeration
entries()
?}?? LhaFile ?????G???g???? LhaHeader ???????q???????BLhaHeader[]
getEntries()
?t?@?C???????G???g?????????????z?????????Bjava.io.InputStream
getInputStream(java.lang.String name)
name???w???????????O???????G???g???? ???e???????????????????}???????X?g???[?????????Bjava.io.InputStream
getInputStream(LhaHeader header)
header ???w?????????G???g???? ???e???????????????????}???????X?g???[?????????Bjava.io.InputStream
getInputStreamWithoutExtract(java.lang.String name)
name???w???????????O???????G???g???? ???e?????????????????}???????X?g???[?????????Bjava.io.InputStream
getInputStreamWithoutExtract(LhaHeader header)
header???w?????????G???g???????e?? ???????????????}???????X?g???[?????????Bint
size()
?}?? LhaFile ?????G???g?????????????B
-
-
-
Constructor Detail
-
LhaFile
public LhaFile(java.lang.String filename) throws java.io.IOException
filename ???w?????????t?@?C???????????f?[?^???????}??LhaFile???\?z?????B
?e???k?`?????????????????????????????????v???p?e?B???? LhaProperty.getProperties() ???????????v???p?e?B???g?p???????B- Parameters:
filename
- LHA?????t?@?C???????O- Throws:
java.io.IOException
- ???o???G???[?????????????java.io.FileNotFoundException
- ?t?@?C???????????????????java.lang.SecurityException
- ?Z?L?????e?B?}?l?[?W?????t?@?C?????????????????????????- See Also:
LhaProperty.getProperties()
-
LhaFile
public LhaFile(java.lang.String filename, java.util.Properties property) throws java.io.IOException
filename ???w?????????t?@?C???????????f?[?^???????}??LhaFile???\?z?????B- Parameters:
filename
- LHA?????t?@?C???????Oproperty
- ?e???k?`?????????????????????????????????????v???p?e?B- Throws:
java.io.IOException
- ???o???G???[?????????????java.io.FileNotFoundException
- ?t?@?C???????????????????java.io.UnsupportedEncodingException
- property.getProperty( "lha.encoding" ) ?????????? ?G???R?[?f?B???O?????T?|?[?g???????????java.lang.SecurityException
- ?Z?L?????e?B?}?l?[?W?????t?@?C?????????????????????????- See Also:
LhaProperty
-
LhaFile
public LhaFile(java.io.File filename) throws java.io.IOException
filename ???w?????????t?@?C???????????f?[?^???????}??LhaFile???\?z?????B
?e???k?`?????????????????????????????????v???p?e?B???? LhaProperty.getProperties() ???????????v???p?e?B???g?p???????B- Parameters:
filename
- LHA?????t?@?C??- Throws:
java.io.IOException
- ???o???G???[?????????????java.io.FileNotFoundException
- ?t?@?C???????????????????java.lang.SecurityException
- ?Z?L?????e?B?}?l?[?W?????t?@?C?????????????????????????- See Also:
LhaProperty.getProperties()
-
LhaFile
public LhaFile(java.io.File filename, java.util.Properties property) throws java.io.IOException
filename ???w?????????t?@?C???????????f?[?^???????}?? LhaFile ???\?z?????B- Parameters:
filename
- LHA?????t?@?C??property
- ?e???k?`?????????????????????????????????????v???p?e?B- Throws:
java.io.IOException
- ???o???G???[?????????????java.io.FileNotFoundException
- ?t?@?C???????????????????java.io.UnsupportedEncodingException
- property.getProperty( "lha.encoding" ) ?????????? ?G???R?[?f?B???O?????T?|?[?g???????????java.lang.SecurityException
- ?Z?L?????e?B?}?l?[?W?????t?@?C?????????????????????????- See Also:
LhaProperty
-
LhaFile
public LhaFile(java.io.RandomAccessFile file) throws java.io.IOException
file ???w?????????t?@?C???????????f?[?^???????}?? LhaFile ???\?z?????B
?e???k?`?????????????????????????????????v???p?e?B???? LhaProperty.getProperties() ???????????v???p?e?B???g?p???????B- Parameters:
file
- LHA?????t?@?C??- Throws:
java.io.IOException
- ???o???G???[?????????????java.io.FileNotFoundException
- ?t?@?C???????????????????java.lang.SecurityException
- ?Z?L?????e?B?}?l?[?W?????t?@?C?????????????????????????- See Also:
LhaProperty.getProperties()
-
LhaFile
public LhaFile(java.io.RandomAccessFile file, boolean rescueMode) throws java.io.IOException
file ???w?????????t?@?C???????????f?[?^???????}?? LhaFile ???\?z?????B
?e???k?`?????????????????????????????????v???p?e?B???? LhaProperty.getProperties() ???????????v???p?e?B???g?p???????B- Parameters:
file
- LHA?????t?@?C??rescueMode
- true ?????????????????????f?[?^?? ?????????????????????[?h???G???g?????????????B- Throws:
java.io.IOException
- ???o???G???[?????????????java.io.FileNotFoundException
- ?t?@?C???????????????????java.lang.SecurityException
- ?Z?L?????e?B?}?l?[?W?????t?@?C?????????????????????????- See Also:
LhaProperty.getProperties()
-
LhaFile
public LhaFile(java.io.RandomAccessFile file, java.util.Properties property) throws java.io.IOException
file ???w?????????t?@?C???????????f?[?^???????}?? LhaFile ???\?z?????B- Parameters:
file
- LHA?????t?@?C??property
- ?e???k?`?????????????????????????????????????v???p?e?B- Throws:
java.io.IOException
- ???o???G???[?????????????java.io.FileNotFoundException
- ?t?@?C???????????????????java.lang.SecurityException
- ?Z?L?????e?B?}?l?[?W?????t?@?C?????????????????????????- See Also:
LhaProperty
-
LhaFile
public LhaFile(java.io.RandomAccessFile file, java.util.Properties property, boolean rescueMode) throws java.io.IOException
file ???w?????????t?@?C???????????f?[?^???????}?? LhaFile ???\?z?????B- Parameters:
file
- LHA?????t?@?C??property
- ?e???k?`?????????????????????????????????????v???p?e?BrescueMode
- true ?????????????????????f?[?^?? ?????????????????????[?h???G???g?????????????B- Throws:
java.io.IOException
- ???o???G???[?????????????java.io.FileNotFoundException
- ?t?@?C???????????????????java.lang.SecurityException
- ?Z?L?????e?B?}?l?[?W?????t?@?C?????????????????????????- See Also:
LhaProperty
-
-
Method Detail
-
getInputStream
public java.io.InputStream getInputStream(LhaHeader header)
header ???w?????????G???g???? ???e???????????????????}???????X?g???[?????????B- Parameters:
header
- ?w?b?_- Returns:
- header???w?????????w?b?_???????G???g????
???e???????}???????X?g???[???B
?G???g????????????????????? null?B
-
getInputStream
public java.io.InputStream getInputStream(java.lang.String name)
name???w???????????O???????G???g???? ???e???????????????????}???????X?g???[?????????B- Parameters:
name
- ?G???g???????O- Returns:
- name???w???????????O???????G???g????
???e???????????????????}???????X?g???[???B
?G???g????????????????????? null?B
-
getInputStreamWithoutExtract
public java.io.InputStream getInputStreamWithoutExtract(LhaHeader header)
header???w?????????G???g???????e?? ???????????????}???????X?g???[?????????B- Parameters:
header
- ?w?b?_- Returns:
- header???w?????????G???g???????e??
???????????????}???????X?g???[???B
?G???g????????????????????? null?B
-
getInputStreamWithoutExtract
public java.io.InputStream getInputStreamWithoutExtract(java.lang.String name)
name???w???????????O???????G???g???? ???e?????????????????}???????X?g???[?????????B- Parameters:
name
- ?G???g???????O- Returns:
- name???w???????????O???????G???g????
???e?????????????????}???????X?g???[???B
?G???g????????????????????? null?B
-
size
public int size()
?}?? LhaFile ?????G???g?????????????B- Returns:
- ?t?@?C???????G???g??????
-
entries
public java.util.Enumeration entries()
?}?? LhaFile ?????G???g???? LhaHeader ???????q???????B- Returns:
- LhaHeader ???????q
- Throws:
java.lang.IllegalStateException
- LhaFile ?? close() ???????????????????B
-
getEntries
public LhaHeader[] getEntries()
?t?@?C???????G???g?????????????z?????????B- Returns:
- ?t?@?C???????G???g?????????????z??
-
close
public void close() throws java.io.IOException
?}?? LHA?????t?@?C??????????B ???????A?}??LhaFile?????s?????S???? InputStream??????I????????????B- Throws:
java.io.IOException
- ???o???G???[?????????????
-
-