Examples of FileOutputStream


Examples of java.io.FileOutputStream

        // This will prevent being left with an empty file if a FTPException
        // is thrown by initGet().
        initGet(remoteFile);

        // create the buffered output stream for writing the file
        FileOutputStream out =
                new FileOutputStream(localPath, resume);
       
        try {
            getDataAfterInitGet(out);
        }
        catch (IOException ex) {
View Full Code Here

Examples of java.io.FileOutputStream

    }
   
    super.saveChanges();
   
    if (_schema != null) {
        OutputStream out = new FileOutputStream(getSchemaDefinitionFile().getLocation().toFile());
        try {
            _schema.write(out);
        } catch (Exception e) {
            IOException ioe = new IOException("Unable to save design config changes.");
              ioe.setStackTrace(e.getStackTrace());
              throw ioe;
        } finally {
            out.close();
        }
    }
   
    try {
      new WGADesignStructureHelper(_designContainer).enforceDesignEncoding();
View Full Code Here

Examples of java.io.FileOutputStream

        if (!_metadataFolder.exists()) {
          _metadataFolder.create(true, true, new NullProgressMonitor())
          _metadataFile = _metadataFolder.getFile(_tmlFile.getName().substring(0, _tmlFile.getName().length() - _tmlFile.getFileExtension().length()) + "metadata.xml");
        }

        writer = new OutputStreamWriter(new FileOutputStream(_metadataFile.getLocation().toFile()), _fileEncoding);
        xstream.toXML(metaData, writer);
       
      } catch (CoreException e) {
        IOException ioe = new IOException("Unable to save metadata file '" + _metadataFile.getLocation() + "'.");
        ioe.setStackTrace(e.getStackTrace());
View Full Code Here

Examples of java.io.FileOutputStream

   * @throws IOException Something went wrong when writing out the license
   * file. It could be anything, full disk, permissions, etc...
   */
  private static final void writeLicenseFileToDisk(byte[] encryptedLicenseFile, File centraViewLicenseFile) throws IOException
  {
    FileOutputStream fileOutputStream = new FileOutputStream(centraViewLicenseFile);
    try {
      fileOutputStream.write(encryptedLicenseFile);
      fileOutputStream.flush();
    } finally {
      fileOutputStream.close();
    }
  }
View Full Code Here

Examples of java.io.FileOutputStream

   
    private void saveMementoToFile(XMLMemento memento) {
        File stateFile = getWorkingSetMemento();
        if (stateFile != null) {
            try {
                FileOutputStream stream = new FileOutputStream(stateFile);
                OutputStreamWriter writer = new OutputStreamWriter(stream, "utf-8"); //$NON-NLS-1$
                memento.save(writer);
                writer.close();
            }
            catch (IOException e) {
View Full Code Here

Examples of java.io.FileOutputStream

    catch(Exception e){
    }
  }

  public void writePublicKey(String name, String comment) throws java.io.FileNotFoundException, java.io.IOException{
    FileOutputStream fos=new FileOutputStream(name);
    writePublicKey(fos, comment);
    fos.close();
  }
View Full Code Here

Examples of java.io.FileOutputStream

    catch(Exception e){
    }
  }

  public void writeSECSHPublicKey(String name, String comment) throws java.io.FileNotFoundException, java.io.IOException{
    FileOutputStream fos=new FileOutputStream(name);
    writeSECSHPublicKey(fos, comment);
    fos.close();
  }
View Full Code Here

Examples of java.io.FileOutputStream

    fos.close();
  }


  public void writePrivateKey(String name) throws java.io.FileNotFoundException, java.io.IOException{
    FileOutputStream fos=new FileOutputStream(name);
    writePrivateKey(fos);
    fos.close();
  }
View Full Code Here

Examples of java.io.FileOutputStream

                if (!logPropertiesFile.exists()) {
                    logPropertiesFile.createNewFile();

                    // copy from initial properties file from classpath
                    InputStream in = getClass().getResourceAsStream("/log4j.properties");
                    OutputStream out = new FileOutputStream(logPropertiesFile);
                    byte[] buf = new byte[1024];
                    int len;
                    while ((len = in.read(buf)) > 0) {
                        out.write(buf, 0, len);
                    }
                    in.close();
                    out.close();
                }
            } catch (IOException ex) {
                Logger.getLogger(ApplicationSettings.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
View Full Code Here

Examples of java.io.FileOutputStream

            @Override
            protected void myconstruct() throws Exception {
                bar.getProgressMonitor().worked(10);
                XmlExport exporter = new XmlExport(dataPool,
                        settings, new FileOutputStream(f.getAbsoluteFile()));

                exporter.doWork();
                bar.getProgressMonitor().worked(100);
            }
        };
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.