Package de.schlichtherle.io

Examples of de.schlichtherle.io.FileOutputStream


                newFile = new File(directory, name);
            }
            if (logger.isDebugEnabled()) {
                logger.debug("Writing to file: " + newFile.getCanonicalPath());
            }
            out = new BufferedOutputStream(new FileOutputStream(newFile));
            marshaler.writeMessage(exchange, in, out, name);
        } finally {
            if (out != null) {
                try {
                    out.close();
View Full Code Here


          public void run() {
            try {
              FTPClient client = getFtpClient();
              File zip = new File(getFileContentService().getBaseDir() + "/" + UPDATE_ZIP_DIRECTORY + "/" + name);
              zip.createNewFile();
              FileOutputStream fos = new FileOutputStream(zip);
              client.retrieveFile(name, fos);
              fos.close();
              closeFtpClient(client);
              unThreadedUpdate(zip);
              LOGGER.info("Update complete - file : " + name + " - for timer : " + timer.getFilePrefix());
            } catch (IOException e) {
              LOGGER.error("Problem occured while updating from zip file.", e);
View Full Code Here

        try {
            String zipName = getZipName(md5);
      String fullPath = zipName+"/"+getSourcePath(className); //$NON-NLS-1$
            File file = new File(fullPath);
            if(!file.exists() || (file.length() == 0)) {
                os = new FileOutputStream(fullPath);
                os.write(source.getBytes());
            }
        } catch (Exception e) {
          LOGGER.error("Unable to store class in cache.",e); //$NON-NLS-1$
        finally {
View Full Code Here

        File z = new File(moduleZipFile.getAbsolutePath()+".tmp");
        if (z.exists()) {
            z.delete();
        }
        de.schlichtherle.io.File zip = new de.schlichtherle.io.File(z);
        ZipOutputStream zop = new ZipOutputStream(new FileOutputStream(new File(zip.getAbsolutePath())));
        //tempFile.deleteOnExit();
        //test if doc is
        try {
          for (String srcPath : srcPaths) {
            ZipHelper.copyIntoAZip("file:"+srcPath+"/*", zop, Parameters.SOURCES_FOLDER+"/", new Predicate() {
View Full Code Here

     * @throws ZipException
     * @throws IOException
     */
    public static void copyArchiveContent(String prefixToRemove, String prefixToAdd, String destPath, String srcPath) throws Exception {
        de.schlichtherle.io.File dest = new de.schlichtherle.io.File(destPath);
        ZipOutputStream zop = new ZipOutputStream(new FileOutputStream(dest));
        try {
            copyArchiveContent(prefixToRemove, prefixToAdd, srcPath, zop);
        } finally {
            zop.close();
        }
View Full Code Here

    private File buildZip() throws Exception {
      //zip module preparation
      File tempFile = File.createTempFile("woj-addModule", ".zip"); //$NON-NLS-1$ //$NON-NLS-2$
        de.schlichtherle.io.File zip = new de.schlichtherle.io.File(tempFile);
        ZipOutputStream zop = new ZipOutputStream(new FileOutputStream(new File(zip.getAbsolutePath())));
        tempFile.deleteOnExit();
        //test if doc is
        try {
          addResource(_docPath, _pathInDoc, zop, Parameters.JAVADOCS_FOLDER);
          addResource(_srcPath, _pathInSrc, zop, Parameters.SOURCES_FOLDER);
View Full Code Here

TOP

Related Classes of de.schlichtherle.io.FileOutputStream

Copyright © 2018 www.massapicom. 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.