BlenderRev of /java/tl/libs/sherman/zipencoding/jdk/build/solaris-sparc/docs/api

BlenderRev generated at Mon Mar 30 13:38:27 2009
/java/tl/libs/sherman/zipencoding/jdk/build/solaris-sparc/docs/api generated at Mon Mar 30 11:11:57 2009
/java/tl/libs/sherman/ziplib/jdk/build/solaris-sparc/docs/api generated at Fri Mar 27 22:03:34 2009

java.util.zip (4 classes, 12 methods)

ZipEntry ZipFile ZipInputStream ZipOutputStream package-summary

java.util.zip.ZipEntry (1 method)

ZipEntry.setComment(java.lang.String)

setComment


 public void setComment(String comment)
Sets the optional comment string for the entry.

ZIP entry comments have maximum length of 0xffff. If the length of the specified comment string is greater than 0xFFFF bytes, only the first 0xFFFF bytes are output to the ZIP file entry.

Parameters:
comment - the comment string
Throws:
IllegalArgumentException - if the length of the specified comment string is greater than 0xFFFF bytes
See Also:
getComment()

setComment

public void setComment(String comment)
Sets the optional comment string for the entry.

Parameters:
comment - the comment string
Throws:
IllegalArgumentException - if the length of the specified comment string is greater than 0xFFFF bytes
See Also:
getComment()

setComment

public void setComment(String comment)
Sets the optional comment string for the entry.

ZIP entry comments have maximum length of 0xffff. If the length of the specified comment string is greater than 0xFFFF bytes, only the first 0xFFFF bytes are output to the ZIP file entry.

Parameters:
comment - the comment string
See Also:
getComment()

java.util.zip.ZipFile (6 methods)

ZipFile(java.io.File)
ZipFile(java.io.File, int)
ZipFile(java.io.File, int, java.nio.charset.Charset)
ZipFile(java.io.File, java.nio.charset.Charset)
ZipFile(java.lang.String)
ZipFile(java.lang.String, java.nio.charset.Charset)

ZipFile.ZipFile(java.io.File)

ZipFile


 public ZipFile(File file)
        throws ZipException,
               IOException
Opens a ZIP file for reading given the specified File object.

The UTF-8 charset is used to decode the entry names and comments.

Parameters:
file - the ZIP file to be opened for reading
Throws:
ZipException - if a ZIP format error has occurred
IOException - if an I/O error has occurred

ZipFile

public ZipFile(File file)
        throws ZipException,
               IOException
Opens a ZIP file for reading given the specified File object.

Parameters:
file - the ZIP file to be opened for reading
Throws:
ZipException - if a ZIP error has occurred
IOException - if an I/O error has occurred

ZipFile

public ZipFile(File file)
        throws ZipException,
               IOException
Opens a ZIP file for reading given the specified File object.

The UTF-8 charset is used to decode the entry names and comments.

Parameters:
file - the ZIP file to be opened for reading
Throws:
ZipException - if a ZIP format error has occurred
IOException - if an I/O error has occurred

ZipFile.ZipFile(java.io.File, int)

ZipFile


 public ZipFile(File file,
               int mode)
        throws IOException
Opens a new ZipFile to read from the specified File object in the specified mode. The mode argument must be either OPEN_READ or OPEN_READ | OPEN_DELETE.

First, if there is a security manager, its checkRead method is called with the name argument as its argument to ensure the read is allowed.

The UTF-8 charset is used to decode the entry names and comments

Parameters:
file - the ZIP file to be opened for reading
mode - the mode in which the file is to be opened
Throws:
ZipException - if a ZIP format error has occurred
IOException - if an I/O error has occurred
SecurityException - if a security manager exists and its checkRead method doesn't allow read access to the file, or its checkDelete method doesn't allow deleting the file when the OPEN_DELETE flag is set.
IllegalArgumentException - if the mode argument is invalid
Since:
1.3
See Also:
SecurityManager.checkRead(java.lang.String)

ZipFile

public ZipFile(File file,
               int mode)
        throws IOException
Opens a new ZipFile to read from the specified File object in the specified mode. The mode argument must be either OPEN_READ or OPEN_READ | OPEN_DELETE.

First, if there is a security manager, its checkRead method is called with the name argument as its argument to ensure the read is allowed.

Parameters:
file - the ZIP file to be opened for reading
mode - the mode in which the file is to be opened
Throws:
ZipException - if a ZIP format error has occurred
IOException - if an I/O error has occurred
SecurityException - if a security manager exists and its checkRead method doesn't allow read access to the file, or its checkDelete method doesn't allow deleting the file when the OPEN_DELETE flag is set.
IllegalArgumentException - if the mode argument is invalid
Since:
1.3
See Also:
SecurityManager.checkRead(java.lang.String)

ZipFile

public ZipFile(File file,
               int mode)
        throws IOException
Opens a new ZipFile to read from the specified File object in the specified mode. The mode argument must be either OPEN_READ or OPEN_READ | OPEN_DELETE.

First, if there is a security manager, its checkRead method is called with the name argument as its argument to ensure the read is allowed.

The UTF-8 charset is used to decode the entry names and comments

Parameters:
file - the ZIP file to be opened for reading
mode - the mode in which the file is to be opened
Throws:
ZipException - if a ZIP format error has occurred
IOException - if an I/O error has occurred
SecurityException - if a security manager exists and its checkRead method doesn't allow read access to the file, or its checkDelete method doesn't allow deleting the file when the OPEN_DELETE flag is set.
IllegalArgumentException - if the mode argument is invalid
Since:
1.3
See Also:
SecurityManager.checkRead(java.lang.String)

ZipFile.ZipFile(java.io.File, int, java.nio.charset.Charset) (New)

ZipFile

public ZipFile(File file,
               int mode,
               Charset charset)
        throws IOException
Opens a new ZipFile to read from the specified File object in the specified mode. The mode argument must be either OPEN_READ or OPEN_READ | OPEN_DELETE.

First, if there is a security manager, its checkRead method is called with the name argument as its argument to ensure the read is allowed.

Parameters:
file - the ZIP file to be opened for reading
mode - the mode in which the file is to be opened
charset - the {@code charset} to be used to decode the ZIP entry name and comment that are not encoded by using UTF-8 encoding (indicated by entry's general purpose flag).
Throws:
ZipException - if a ZIP format error has occurred
IOException - if an I/O error has occurred
SecurityException - if a security manager exists and its checkRead method doesn't allow read access to the file,or its checkDelete method doesn't allow deleting the file when the OPEN_DELETE flag is set
IllegalArgumentException - if the mode argument is invalid
Since:
1.7
See Also:
SecurityManager.checkRead(java.lang.String)

ZipFile.ZipFile(java.io.File, java.nio.charset.Charset) (New)

ZipFile

public ZipFile(File file,
               Charset charset)
        throws IOException
Opens a ZIP file for reading given the specified File object.

Parameters:
file - the ZIP file to be opened for reading
charset - The {@code charset} to be used to decode the ZIP entry name and comment (ignored if the language encoding bit of the ZIP entry's general purpose bit flag is set).
Throws:
ZipException - if a ZIP format error has occurred
IOException - if an I/O error has occurred
Since:
1.7

ZipFile.ZipFile(java.lang.String)

ZipFile


 public ZipFile(String name)
        throws IOException
Opens a zip file for reading.

First, if there is a security manager, its checkRead method is called with the name argument as its argument to ensure the read is allowed.

The UTF-8 charset is used to decode the entry names and comments.

Parameters:
name - the name of the zip file
Throws:
ZipException - if a ZIP format error has occurred
IOException - if an I/O error has occurred
SecurityException - if a security manager exists and its checkRead method doesn't allow read access to the file.
See Also:
SecurityManager.checkRead(java.lang.String)

ZipFile

public ZipFile(String name)
        throws IOException
Opens a zip file for reading.

First, if there is a security manager, its checkRead method is called with the name argument as its argument to ensure the read is allowed.

Parameters:
name - the name of the zip file
Throws:
ZipException - if a ZIP format error has occurred
IOException - if an I/O error has occurred
SecurityException - if a security manager exists and its checkRead method doesn't allow read access to the file.
See Also:
SecurityManager.checkRead(java.lang.String)

ZipFile

public ZipFile(String name)
        throws IOException
Opens a zip file for reading.

First, if there is a security manager, its checkRead method is called with the name argument as its argument to ensure the read is allowed.

The UTF-8 charset is used to decode the entry names and comments.

Parameters:
name - the name of the zip file
Throws:
ZipException - if a ZIP format error has occurred
IOException - if an I/O error has occurred
SecurityException - if a security manager exists and its checkRead method doesn't allow read access to the file.
See Also:
SecurityManager.checkRead(java.lang.String)

ZipFile.ZipFile(java.lang.String, java.nio.charset.Charset) (New)

ZipFile

public ZipFile(String name,
               Charset charset)
        throws IOException
Opens a zip file for reading.

First, if there is a security manager, its checkRead method is called with the name argument as its argument to ensure the read is allowed.

Parameters:
name - the name of the zip file
charset - the {@code charset} to be used to decode the ZIP entry name and comment that are not encoded by using UTF-8 encoding (indicated by entry's general purpose flag).
Throws:
ZipException - if a ZIP format error has occurred
IOException - if an I/O error has occurred
SecurityException - if a security manager exists and its checkRead method doesn't allow read access to the file
Since:
1.7
See Also:
SecurityManager.checkRead(java.lang.String)

java.util.zip.ZipInputStream (3 methods)

ZipInputStream(java.io.InputStream)
ZipInputStream(java.io.InputStream, java.nio.charset.Charset)
read(byte[], int, int)

ZipInputStream.ZipInputStream(java.io.InputStream)

ZipInputStream


 public ZipInputStream(InputStream in)
Creates a new ZIP input stream.

The UTF-8 charset is used to decode the entry names.

Parameters:
in - the actual input stream

ZipInputStream

public ZipInputStream(InputStream in)
Creates a new ZIP input stream.

Parameters:
in - the actual input stream

ZipInputStream

public ZipInputStream(InputStream in)
Creates a new ZIP input stream.

The UTF-8 charset is used to decode the entry names.

Parameters:
in - the actual input stream

ZipInputStream.ZipInputStream(java.io.InputStream, java.nio.charset.Charset) (New)

ZipInputStream

public ZipInputStream(InputStream in,
                      Charset charset)
Creates a new ZIP input stream.

Parameters:
in - the actual input stream
charset - The {@code charset} to be used to decode the ZIP entry name (ignored if the language encoding bit of the ZIP entry's general purpose bit flag is set).
Since:
1.7

ZipInputStream.read(byte[], int, int)

read


 public int read(byte[] b,
                int off,
                int len)
         throws IOException
Reads from the current ZIP entry into an array of bytes. If len is not zero, the method blocks until some input is available; otherwise, no bytes are read and 0 is returned.

Overrides:
read in class InflaterInputStream
Parameters:
b - the buffer into which the data is read
off - the start offset in the destination array b
len - the maximum number of bytes read
Returns:
the actual number of bytes read, or -1 if the end of the entry is reached
Throws:
NullPointerException - if If b is null.
IndexOutOfBoundsException - if If off is negative, len is negative, or len is greater than b.length - off
ZipException - if a ZIP file error has occurred
IOException - if an I/O error has occurred
See Also:
FilterInputStream.in

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Reads from the current ZIP entry into an array of bytes. If len is not zero, the method blocks until some input is available; otherwise, no bytes are read and 0 is returned.

Overrides:
read in class InflaterInputStream
Parameters:
b - the buffer into which the data is read
off - the start offset in the destination array b
len - the maximum number of bytes read
Returns:
the actual number of bytes read, or -1 if the end of the entry is reached
Throws:
NullPointerException - If b is null.
IndexOutOfBoundsException - If off is negative, len is negative, or len is greater than b.length - off
ZipException - if a ZIP file error has occurred
IOException - if an I/O error has occurred
See Also:
FilterInputStream.in

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Reads from the current ZIP entry into an array of bytes. If len is not zero, the method blocks until some input is available; otherwise, no bytes are read and 0 is returned.

Overrides:
read in class InflaterInputStream
Parameters:
b - the buffer into which the data is read
off - the start offset in the destination array b
len - the maximum number of bytes read
Returns:
the actual number of bytes read, or -1 if the end of the entry is reached
Throws:
NullPointerException - if b is null.
IndexOutOfBoundsException - if off is negative, len is negative, or len is greater than b.length - off
ZipException - if a ZIP file error has occurred
IOException - if an I/O error has occurred
See Also:
FilterInputStream.in

java.util.zip.ZipOutputStream (2 methods)

ZipOutputStream(java.io.OutputStream)
ZipOutputStream(java.io.OutputStream, java.nio.charset.Charset)

ZipOutputStream.ZipOutputStream(java.io.OutputStream)

ZipOutputStream


 public ZipOutputStream(OutputStream out)
Creates a new ZIP output stream.

The UTF-8 charset is used to encode the entry names and comments.

Parameters:
out - the actual output stream

ZipOutputStream

public ZipOutputStream(OutputStream out)
Creates a new ZIP output stream.

Parameters:
out - the actual output stream

ZipOutputStream

public ZipOutputStream(OutputStream out)
Creates a new ZIP output stream.

The UTF-8 charset is used to encode the entry names and comments.

Parameters:
out - the actual output stream

ZipOutputStream.ZipOutputStream(java.io.OutputStream, java.nio.charset.Charset) (New)

ZipOutputStream

public ZipOutputStream(OutputStream out,
                       Charset charset)
Creates a new ZIP output stream.

Parameters:
out - the actual output stream
charset - the charset to be used to encode the entry names and comments
Since:
1.7

java.util.zip.package-summary

package-summary.PACKAGE_DESCRIPTION

Package java.util.zip Description

Provides classes for reading and writing the standard ZIP and GZIP file formats. Also includes classes for compressing and decompressing data using the DEFLATE compression algorithm, which is used by the ZIP and GZIP file formats. Additionally, there are utility classes for computing the CRC-32 and Adler-32 checksums of arbitrary input streams.

Package Specification

Since:
JDK1.1

Package java.util.zip Description

Provides classes for reading and writing the standard ZIP and GZIP file formats. Also includes classes for compressing and decompressing data using the DEFLATE compression algorithm, which is used by the ZIP and GZIP file formats. Additionally, there are utility classes for computing the CRC-32 and Adler-32 checksums of arbitrary input streams.

Package Specification

Since:
JDK1.1

Package java.util.zip Description

Provides classes for reading and writing the standard ZIP and GZIP file formats. Also includes classes for compressing and decompressing data using the DEFLATE compression algorithm, which is used by the ZIP and GZIP file formats. Additionally, there are utility classes for computing the CRC-32 and Adler-32 checksums of arbitrary input streams.

Package Specification

Since:
JDK1.1