|
JavaTM 2 Platform Std. Ed. v1. 4.0 |
||||||||||
전의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 모든 클래스 | ||||||||||
개요: 상자 | 필드 | constructor | 메소드 | 상세: 필드 | constructor | 메소드 |
java.lang.Object | +--java.util.zip.ZipFile
이 클래스는 ZIP 파일로부터 엔트리를 읽어들이기 위해서(때문에) 사용합니다.
필드의 개요 | |
static int |
CENATT
|
static int |
CENATX
|
static int |
CENCOM
|
static int |
CENCRC
|
static int |
CENDSK
|
static int |
CENEXT
|
static int |
CENFLG
|
static int |
CENHDR
|
static int |
CENHOW
|
static int |
CENLEN
|
static int |
CENNAM
|
static int |
CENOFF
|
static long |
CENSIG
|
static int |
CENSIZ
|
static int |
CENTIM
|
static int |
CENVEM
|
static int |
CENVER
|
static int |
ENDCOM
|
static int |
ENDHDR
|
static int |
ENDOFF
|
static long |
ENDSIG
|
static int |
ENDSIZ
|
static int |
ENDSUB
|
static int |
ENDTOT
|
static int |
EXTCRC
|
static int |
EXTHDR
|
static int |
EXTLEN
|
static long |
EXTSIG
|
static int |
EXTSIZ
|
static int |
LOCCRC
|
static int |
LOCEXT
|
static int |
LOCFLG
|
static int |
LOCHDR
|
static int |
LOCHOW
|
static int |
LOCLEN
|
static int |
LOCNAM
|
static long |
LOCSIG
|
static int |
LOCSIZ
|
static int |
LOCTIM
|
static int |
LOCVER
|
static int |
OPEN_DELETE
ZIP 파일을 열어, 삭제의 마크를 붙이는 모드 플래그입니다. |
static int |
OPEN_READ
ZIP 파일을 읽어들여용으로 여는 모드 플래그입니다. |
생성자의 개요 | |
ZipFile (File file)
File 오브젝트로 지정된 ZIP 파일을 읽어들여용으로 엽니다. |
|
ZipFile (File file,
int mode)
지정된 모드로 지정의 File 오브젝트로부터 읽어내기 위한 새로운 ZipFile 를 엽니다. |
|
ZipFile (String name)
ZIP 파일을 읽어들여용으로 엽니다. |
메소드의 개요 | |
void |
close ()
ZIP 파일을 닫습니다. |
Enumeration |
entries ()
ZIP 파일 엔트리의 열거를 돌려줍니다. |
protected void |
finalize ()
ZIP 파일에의 참조가 존재하지 않게 되었을 때에, 이 ZIP 파일의 close 메소드가 확실히 불려 가도록(듯이) 합니다.
|
ZipEntry |
getEntry (String name)
지정된 이름의 ZIP 파일 엔트리를 돌려줍니다. |
InputStream |
getInputStream (ZipEntry entry)
지정된 ZIP 파일 엔트리의 내용을 읽어들이기 위한 입력 스트림을 돌려줍니다. |
String |
getName ()
ZIP 파일의 패스명을 돌려줍니다. |
int |
size ()
ZIP 파일중의 엔트리의 수를 돌려줍니다. |
클래스 java.lang. Object 에서 상속받은 메소드 |
clone , equals , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
필드의 상세 |
public static final int OPEN_READ
public static final int OPEN_DELETE
public static final long LOCSIG
public static final long EXTSIG
public static final long CENSIG
public static final long ENDSIG
public static final int LOCHDR
public static final int EXTHDR
public static final int CENHDR
public static final int ENDHDR
public static final int LOCVER
public static final int LOCFLG
public static final int LOCHOW
public static final int LOCTIM
public static final int LOCCRC
public static final int LOCSIZ
public static final int LOCLEN
public static final int LOCNAM
public static final int LOCEXT
public static final int EXTCRC
public static final int EXTSIZ
public static final int EXTLEN
public static final int CENVEM
public static final int CENVER
public static final int CENFLG
public static final int CENHOW
public static final int CENTIM
public static final int CENCRC
public static final int CENSIZ
public static final int CENLEN
public static final int CENNAM
public static final int CENEXT
public static final int CENCOM
public static final int CENDSK
public static final int CENATT
public static final int CENATX
public static final int CENOFF
public static final int ENDSUB
public static final int ENDTOT
public static final int ENDSIZ
public static final int ENDOFF
public static final int ENDCOM
생성자의 상세 |
public ZipFile(String name) throws IOException
시큐러티 매니저가 존재하는 경우는 우선, 시큐러티 매니저의 checkRead
메소드가 인수 name
를 지정해 불려 가 read가 허가될지 어떨지가 확인됩니다.
name
- ZIP 파일의 이름
ZipException
- ZIP 형식 에러가 발생했을 경우
IOException
- 입출력 에러가 발생했을 경우
SecurityException
- 시큐러티 매니저가 존재하는 경우에, 시큐러티 매니저의 checkRead
메소드가 파일에의 읽어들여 액세스를 허가하지 않을 때SecurityManager.checkRead(java.lang.String)
public ZipFile(File file, int mode) throws IOException
File
오브젝트로부터 읽어내기 위한 새로운 ZipFile
를 엽니다. 모드 인수는 OPEN_READ 또는 OPEN_READ | OPEN_DELETE 일 필요가 있습니다.
시큐러티 매니저가 존재하는 경우는 우선, 시큐러티 매니저의 checkRead
메소드가 인수 name
를 지정해 불려 가 read가 허가될지 어떨지가 확인됩니다.
file
- read용으로 여는 ZIP 파일mode
- 파일을 열 때의 모드
ZipException
- ZIP 형식 에러가 발생했을 경우
IOException
- 입출력 에러가 발생했을 경우
SecurityException
- 시큐러티 매니저가 존재하는 경우에, 그 checkRead
메소드가 파일에의 읽어들여 액세스를 허가하지 않을 때, 또는 OPEN_DELETE 플래그가 설정되어 있는데 checkDelete
메소드가 파일의 삭제를 허가하지 않는 경우
IllegalArgumentException
- mode 인수가 무효인 경우SecurityManager.checkRead(java.lang.String)
public ZipFile(File file) throws ZipException , IOException
file
- read용으로 여는 ZIP 파일
ZipException
- ZIP 에러가 발생했을 경우
IOException
- 입출력 에러가 발생했을 경우메소드의 상세 |
public ZipEntry getEntry(String name)
name
- 엔트리의 이름
IllegalStateException
- ZIP 파일이 닫혀지고 있는 경우public InputStream getInputStream(ZipEntry entry) throws IOException
entry
- ZIP 파일 엔트리
ZipException
- ZIP 형식 에러가 발생했을 경우
IOException
- 입출력 에러가 발생했을 경우
IllegalStateException
- ZIP 파일이 닫혀지고 있는 경우public String getName()
public Enumeration entries()
IllegalStateException
- ZIP 파일이 닫혀지고 있는 경우public int size()
IllegalStateException
- ZIP 파일이 닫혀지고 있는 경우public void close() throws IOException
IOException
- 입출력 에러가 발생했을 경우protected void finalize() throws IOException
close
메소드가 확실히 불려 가도록(듯이) 합니다.
GC 로 이 메소드가 불려 가는 시간이 정해져 있지 않기 때문에, 이 ZipFile
에의 액세스가 완료한 직후에, 어플리케이션으로 close
메소드를 호출하는 것을 강하게 추천합니다. 이것에 의해, 시간이 정해지지 않은 채 system resource가 보관 유지되는 것을 방지할 수 있습니다.
Object
내의 finalize
IOException
- 입출력 에러가 발생했을 경우close()
|
JavaTM 2 Platform Std. Ed. v1. 4.0 |
||||||||||
전의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 모든 클래스 | ||||||||||
개요: 상자 | 필드 | constructor | 메소드 | 상세: 필드 | constructor | 메소드 |
Java, Java 2 D, 및 JDBC 는 미국 및 그 외의 나라에 있어서의 미국 Sun Microsystems, Inc. 의 상표 혹은 등록상표입니다.
Copyright 1993-2002 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.