/[classpath]/classpath/java/util/zip/ZipOutputStream.java
ViewVC logotype

Diff of /classpath/java/util/zip/ZipOutputStream.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by jewel, Thu May 30 18:50:40 2002 UTC revision 1.6 by mark, Mon Oct 28 00:21:39 2002 UTC
# Line 158  public class ZipOutputStream extends Def Line 158  public class ZipOutputStream extends Def
158     * is not set in the entry, the current time is used.     * is not set in the entry, the current time is used.
159     * @param entry the entry.     * @param entry the entry.
160     * @exception IOException if an I/O error occured.     * @exception IOException if an I/O error occured.
161     * @exception IllegalStateException if stream was finished     * @exception ZipException if stream was finished.
162     */     */
163    public void putNextEntry(ZipEntry entry) throws IOException    public void putNextEntry(ZipEntry entry) throws IOException
164    {    {
165      if (entries == null)      if (entries == null)
166        throw new IllegalStateException("ZipOutputStream was finished");        throw new ZipException("ZipOutputStream was finished");
167    
168      int method = entry.getMethod();      int method = entry.getMethod();
169      int flags = 0;      int flags = 0;
# Line 249  public class ZipOutputStream extends Def Line 249  public class ZipOutputStream extends Def
249    /**    /**
250     * Closes the current entry.     * Closes the current entry.
251     * @exception IOException if an I/O error occured.     * @exception IOException if an I/O error occured.
252     * @exception IllegalStateException if no entry is active.     * @exception ZipException if no entry is active.
253     */     */
254    public void closeEntry() throws IOException    public void closeEntry() throws IOException
255    {    {
256      if (curEntry == null)      if (curEntry == null)
257        throw new IllegalStateException("No open entry");        throw new ZipException("No open entry");
258    
259      /* First finish the deflater, if appropriate */      /* First finish the deflater, if appropriate */
260      if (curMethod == DEFLATED)      if (curMethod == DEFLATED)
# Line 300  public class ZipOutputStream extends Def Line 300  public class ZipOutputStream extends Def
300    /**    /**
301     * Writes the given buffer to the current entry.     * Writes the given buffer to the current entry.
302     * @exception IOException if an I/O error occured.     * @exception IOException if an I/O error occured.
303     * @exception IllegalStateException if no entry is active.     * @exception ZipException if no entry is active.
304     */     */
305    public void write(byte[] b, int off, int len) throws IOException    public void write(byte[] b, int off, int len) throws IOException
306    {    {
307      if (curEntry == null)      if (curEntry == null)
308        throw new IllegalStateException("No open entry.");        throw new ZipException("No open entry.");
309    
310      switch (curMethod)      switch (curMethod)
311        {        {

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26