Examples of FileOutputStream


Examples of com.zaranux.client.java.io.FileOutputStream

    {
      FileInputStream fdIn = new FileInputStream(FileDescriptor.in);
      fdIn.setInputBuffer(inBuffer);
      in = fdIn; //new BufferedInputStream(fdIn);
       
      FileOutputStream fdOut = new FileOutputStream(FileDescriptor.out);
      fdOut.setOutputBuffer(outBuffer);
      //out = new PrintStream(new BufferedOutputStream(fdOut, 128), true);
      out = new PrintStream(fdOut, true);
     



       
      FileOutputStream fdErr = new FileOutputStream(FileDescriptor.err);
         fdErr.setErrorBuffer(errBuffer);
      err = new PrintStream(new BufferedOutputStream(fdErr, 128), true);
     
    }
View Full Code Here

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

Examples of java.io.FileOutputStream

        String on = sform.getFile().getFileName();
        String ext = (on.indexOf(".")!=-1)?on.substring(on.indexOf(".")+1):"res";           
        String fileName = sform.getName()+"."+ext;
       
        File ofile = new File( tresources, fileName );
        FileOutputStream fos = new FileOutputStream(ofile);
        fos.write(sform.getFile().getFileData());
       
        // clean the form
        sform.setName("");
       
        // Forward to the next page
View Full Code Here

Examples of java.io.FileOutputStream

            File tempDir = createTempDirectory("teiid-deploy-content", null, getServerTempDirectory());

            //The userSpecifiedName is used in case we renamed the file to add version.
            File contentCopy = new File(tempDir, userSpecifedName);

            os = new BufferedOutputStream(new FileOutputStream(contentCopy));
            ContentContext contentContext = resourceContext.getContentContext();
            ContentServices contentServices = contentContext.getContentServices();
            contentServices.downloadPackageBitsForChildResource(contentContext, resourceType.getName(), key, os);

            return contentCopy;
View Full Code Here

Examples of java.io.FileOutputStream

      log.trace("saveAttachment, attachmentsStore=" + attachmentsStore + ", attachment=" + attachment); //$NON-NLS-1$ //$NON-NLS-2$
    }
   
    ObjectOutputStream oos = null;
    try {
      oos = new ObjectOutputStream(new FileOutputStream(attachmentsStore));
      oos.writeObject(attachment);
    } finally {
      if (oos != null) {
        oos.close();
      }
View Full Code Here

Examples of java.io.FileOutputStream

          FileUtils.write(configStr.getBytes(), config);
          manifest.delete();
        }
        transformConfig(config, "/vdb.xsl", new StreamResult(new File(metainf, "vdb.xml")));
        config.delete();
        FileOutputStream out = new FileOutputStream(new File(file.getParent(), fileName + "_70.vdb"));
        ZipOutputStream zos = new ZipOutputStream(new BufferedOutputStream(out));
        int parentLength = dir.getPath().length();
        addDirectory(dir, zos, parentLength);
        zos.close();
      } finally {
View Full Code Here

Examples of java.io.FileOutputStream

    String filename = url2Filename(doc.getURL());
    if (doc.getContent().length >= minFileSize) {
      try {
    createDirs(filename);
    BufferedOutputStream os =
      new BufferedOutputStream(new FileOutputStream(filename));
    os.write(doc.getContent());
    os.flush();
    os.close();
      } catch (IOException e) {
    throw new DocManagerException(e.getMessage());
View Full Code Here

Examples of java.io.FileOutputStream

      }
      int returnVal = m_FileChooser.showSaveDialog(this);
      if (returnVal == JFileChooser.APPROVE_OPTION) {
  File sFile = m_FileChooser.getSelectedFile();
  try {
    ObjectOutputStream oo = new ObjectOutputStream(new BufferedOutputStream(new FileOutputStream(sFile)));
    oo.writeObject(object);
    oo.close();
  } catch (Exception ex) {
    JOptionPane.showMessageDialog(this,
          "Couldn't write to file: "
View Full Code Here

Examples of java.io.FileOutputStream

      }
    }

    // Save the classifier if an object output file is provided
    if (objectOutputFileName.length() != 0) {
      OutputStream os = new FileOutputStream(objectOutputFileName);
      // binary
      if (!(objectOutputFileName.endsWith(".xml") || (objectOutputFileName.endsWith(".koml") && KOML.isPresent()))) {
        if (objectOutputFileName.endsWith(".gz")) {
          os = new GZIPOutputStream(os);
        }
View Full Code Here

Examples of java.io.FileOutputStream

      // Check if jbossws-cxf.xml is present, and if so, updated the provider implementation class attribute
      File f=new File(builder.getWebInf(), "jbossws-cxf.xml");
     
      if (f.exists()) {
        FileInputStream fis=null;
        FileOutputStream fos=null;
       
        try {
          fis=new FileInputStream(f);
         
          byte[] b=new byte[fis.available()];
          fis.read(b);
         
          String str=new String(b);
         
          fis.close();
          fis = null;
         
          if (str.indexOf("@provider@") != -1) {
            fos=new FileOutputStream(f);
           
            str = str.replaceAll("@provider@", provider.getClass().getName());
           
            fos.write(str.getBytes());
           
            fos.flush();
            fos.close();
           
            fos = null;
          } else {
            // Report error
            System.err.println("jbossws-cxf.xml file does not contain @provider@ field");
          }
         
        } catch (IOException e) {
          throw new RuntimeException("Failed to copy files", e);
        } finally {
          try {
            if (fis != null) fis.close();
          } catch (IOException e) {
          }
          try {
            if (fos != null) fos.close();
          } catch (IOException 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.