Examples of closeEntry()


Examples of java.util.zip.ZipInputStream.closeEntry()

                    entryName = "/" + entryName;
                }
                if (entryName.equals(name)) {
                    ByteArrayOutputStream out = new ByteArrayOutputStream();
                    IOUtils.copy(zipIn, out);
                    zipIn.closeEntry();
                    return out.toByteArray();
                }
                zipIn.closeEntry();
            }
        } catch (IOException e) {
View Full Code Here

Examples of java.util.zip.ZipInputStream.closeEntry()

                    ByteArrayOutputStream out = new ByteArrayOutputStream();
                    IOUtils.copy(zipIn, out);
                    zipIn.closeEntry();
                    return out.toByteArray();
                }
                zipIn.closeEntry();
            }
        } catch (IOException e) {
            // if this happens we have a real problem
            e.printStackTrace();
        } finally {
View Full Code Here

Examples of java.util.zip.ZipInputStream.closeEntry()

          }
        }

      }
      out.closeEntry();
      in.closeEntry();
    }
    out.close();
    in.close();
  }
}
View Full Code Here

Examples of java.util.zip.ZipInputStream.closeEntry()

            RDFParseException pe = new RDFParseException(msg, e.getLineNumber(), e.getColumnNumber());
            pe.initCause(e);
            throw pe;
          }
          finally {
            zipIn.closeEntry();
          }
        }
      }
      finally {
        zipIn.close();
View Full Code Here

Examples of java.util.zip.ZipOutputStream.closeEntry()

            int len;
            while ((len = in.read(buf)) > 0) {
              zip.write(buf, 0, len);
            }

            zip.closeEntry();
            in.close();
          }
        }
      }
View Full Code Here

Examples of java.util.zip.ZipOutputStream.closeEntry()

          int len;
          while ((len = in.read(buf)) > 0) {
            zip.write(buf, 0, len);
          }

          zip.closeEntry();
          in.close();
        }
      }

      // add sections
View Full Code Here

Examples of java.util.zip.ZipOutputStream.closeEntry()

          ZipEntry ze =
            new ZipEntry("section/" + section.getId() + ".html");
          zip.putNextEntry(ze);
          zip.write(content.getBytes());
          zip.closeEntry();
        } catch (Exception e) {
          System.out.println(
            "Static export error, section " + section.getId());
        }
      }
View Full Code Here

Examples of java.util.zip.ZipOutputStream.closeEntry()

          ZipEntry ze =
            new ZipEntry(
              "publication/" + publication.getId() + ".html");
          zip.putNextEntry(ze);
          zip.write(content.getBytes());
          zip.closeEntry();
        } catch (Exception e) {
          System.out.println(
            "Static export error, publication "
              + publication.getId());
        }
View Full Code Here

Examples of java.util.zip.ZipOutputStream.closeEntry()

        }
      }
      ZipEntry ze = new ZipEntry("section/index.html");
      zip.putNextEntry(ze);
      zip.write(content.getBytes());
      zip.closeEntry();
      ze = new ZipEntry("index.html");
      zip.putNextEntry(ze);
      String redirect =
        "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0;URL=section/index.html\">";
      zip.write(redirect.getBytes());
View Full Code Here

Examples of java.util.zip.ZipOutputStream.closeEntry()

      ze = new ZipEntry("index.html");
      zip.putNextEntry(ze);
      String redirect =
        "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0;URL=section/index.html\">";
      zip.write(redirect.getBytes());
      zip.closeEntry();

      zip.close();
    } catch (Exception e) {
      throw new ServletException(e);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.