Package java.io

Examples of java.io.BufferedOutputStream


  {
    UserManagerConfig config = new UserManagerConfig();
    List users = new ArrayList( usersMap.values() );
    config.setUsers(users);
   
    XMLEncoder encoder = new XMLEncoder( new BufferedOutputStream( out ) );
    encoder.writeObject(config);
    encoder.close();
  }
View Full Code Here


        basePath = new File(basePath).getPath();
        try {
            if (new File(destFile).isDirectory()) {
                throw new IOException("Can't create the file as a directory with this name already exists: " + destFile);
            }
            OutputStream out = new BufferedOutputStream(new FileOutputStream(destFile));
            ZipOutputStream zipOut;
            if (jar) {
                zipOut = new JarOutputStream(out);
            } else {
                zipOut = new ZipOutputStream(out);
View Full Code Here

      String[] names = file.list();
      if (names == null) {
        res.sendError(HttpServletResponse.SC_FORBIDDEN, "Can't access " + req.getRequestURI());
        return;
      }
      PrintStream p = new PrintStream(new BufferedOutputStream(out), false, charSet); // 1.4
      p.println("<HTML><HEAD>");
      p.println("<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=" + charSet + "\">");
      p.println("<TITLE>Index of " + path + "</TITLE>");
      p.println("</HEAD><BODY " + Serve.BGCOLOR);
      p.println("><H2>Index of " + path + "</H2>");
View Full Code Here

          response.setContentType(this.getMimeType(fileName));
        }
       
        // send the output.
        ServletOutputStream outStream = response.getOutputStream();
        BufferedOutputStream bufferedOutStream = new BufferedOutputStream(outStream);
        bufferedOutStream.write(buffer, 0, buffer.length);
        bufferedOutStream.flush();
        bufferedOutStream.close();
      }//end of if(fileID > 0)
    }
    catch(Exception e){
      logger.error("[ImageServlet] Exception thrown in service(): ", e);
    }
View Full Code Here

      response.setContentType("image/gif");
      buffer = spacerGif;
    }
    // send the output.
    ServletOutputStream outStream = response.getOutputStream();
    BufferedOutputStream bufferedOutStream = new BufferedOutputStream(outStream);
    bufferedOutStream.write(buffer, 0, buffer.length);
    bufferedOutStream.flush();
    bufferedOutStream.close();
  }
View Full Code Here

                lobManager.updateReferences(batchManager.lobIndexes, tuple);
              }
            }
            synchronized (batchManager.store) {
              offset = batchManager.getOffset();
              OutputStream fsos = new BufferedOutputStream(batchManager.store.createOutputStream(), IO_BUFFER_SIZE);
                    ObjectOutputStream oos = new ObjectOutputStream(fsos);
                    batch.writeExternal(oos);
                    oos.close();
                    long size = batchManager.store.getLength() - offset;
                    long[] info = new long[] {offset, size};
View Full Code Here

    private Object readLock = new Object();

    private OioObjectChannel(Socket socket) throws IOException {
      log.fine("creating new OioObjectChannel"); //$NON-NLS-1$
      this.socket = socket;
            BufferedOutputStream bos = new BufferedOutputStream( socket.getOutputStream(), STREAM_BUFFER_SIZE);
            outputStream = new ObjectEncoderOutputStream( new DataOutputStream(bos), 512);
            //The output stream must be flushed on creation in order to write some initialization data
            //through the buffered stream to the input stream on the other side
            outputStream.flush();
            final ClassLoader cl = this.getClass().getClassLoader();
View Full Code Here

    private static PrintStream getSummaryStream(String outputDir,
      String summaryName) throws IOException {
  File summaryFile = createSummaryFile(outputDir, summaryName);
  OutputStream os = new FileOutputStream(summaryFile);
  os = new BufferedOutputStream(os);
  return new PrintStream(os);
    }
View Full Code Here

        + summaryFile.getAbsolutePath());
      throw ioe;
  }

  OutputStream os = new FileOutputStream(summaryFile);
  os = new BufferedOutputStream(os);
  return new PrintStream(os);
    }
View Full Code Here

    File tempDir = this.resourceContext.getTemporaryDirectory();
    File tempFile = new File(tempDir, this.deploymentFile.getName());

    OutputStream tempOutputStream = null;
    try {
      tempOutputStream = new BufferedOutputStream(new FileOutputStream(
          tempFile));
      long bytesWritten = contentServices.downloadPackageBits(
          this.resourceContext.getContentContext(), packageDetails
              .getKey(), tempOutputStream, true);
      log
View Full Code Here

TOP

Related Classes of java.io.BufferedOutputStream

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.