Examples of createOutputStream()


Examples of be.bagofwords.virtualfile.VirtualFile.createOutputStream()

                        connection.flush();
                    }
                } else if (action == Action.OUTPUT_STREAM) {
                    String relPath = connection.readString();
                    VirtualFile file = virtualFileService.getRootDirectory().getFile(relPath);
                    OutputStream os = file.createOutputStream();
                    connection.writeLong(LONG_OK);
                    connection.flush();
                    IOUtils.copy(connection.getIs(), os);
                } else if (action == Action.EXISTS) {
                    String relPath = connection.readString();
View Full Code Here

Examples of com.hadoop.compression.lzo.LzopCodec.createOutputStream()

    FileSystem hdfs = FileSystem.get(config);
    InputStream is = null;
    OutputStream os = null;
    try {
      is = hdfs.open(src);
      os = codec.createOutputStream(hdfs.create(destFile));

      IOUtils.copyBytes(is, os, config);
    } finally {
      IOUtils.closeStream(os);
      IOUtils.closeStream(is);
View Full Code Here

Examples of com.sun.star.report.OutputRepository.createOutputStream()

            // copy the image into the local output-storage
            // todo: Implement data-fingerprinting so that we can detect the mime-type
            final OutputRepository storage = outputRepository.openOutputRepository("Pictures", null);
            final DefaultNameGenerator nameGenerator = new DefaultNameGenerator(storage);
            final String name = nameGenerator.generateName("image", mimeType);
            final OutputStream outputStream = storage.createOutputStream(name, mimeType);
            final ByteArrayInputStream bin = new ByteArrayInputStream(data);

            try
            {
                IOUtils.getInstance().copyStreams(bin, outputStream);
View Full Code Here

Examples of com.sun.star.report.OutputRepository.createOutputStream()

        // copy the image into the local output-storage
        final OutputRepository storage = outputRepository.openOutputRepository("Pictures", null);
        final DefaultNameGenerator nameGenerator = new DefaultNameGenerator(storage);
        final String name = nameGenerator.generateName("image", mimeType);
        final OutputStream outputStream = storage.createOutputStream(name, mimeType);
        final ByteArrayInputStream bin = new ByteArrayInputStream(data);

        try
        {
            IOUtils.getInstance().copyStreams(bin, outputStream);
View Full Code Here

Examples of org.apache.ftpserver.ftplet.FileObject.createOutputStream()

           
            // transfer data
            boolean failure = false;
            OutputStream outStream = null;
            try {
                outStream = file.createOutputStream(skipLen);
                long transSz = dataConnection.transferFromClient(outStream);
               
                // log message
                String userName = session.getUser().getName();
                LOG.info("File upload : " + userName + " - " + fileName);
View Full Code Here

Examples of org.apache.ftpserver.ftplet.FileObject.createOutputStream()

              if(file.doesExist()) {
                offset = file.getSize();
              }
             
                // open streams
                os = file.createOutputStream(offset);
                   
                // transfer data
                long transSz = dataConnection.transferFromClient(os);
               
                // log message
View Full Code Here

Examples of org.apache.ftpserver.ftplet.FtpFile.createOutputStream()

                if (file.doesExist()) {
                    offset = file.getSize();
                }

                // open streams
                os = file.createOutputStream(offset);

                // transfer data
                transSz = dataConnection.transferFromClient(session.getFtpletSession(), os);

                // attempt to close the output stream so that errors in
View Full Code Here

Examples of org.apache.ftpserver.ftplet.FtpFile.createOutputStream()

            // transfer data
            boolean failure = false;
            OutputStream outStream = null;
            long transSz = 0L;
            try {
                outStream = file.createOutputStream(skipLen);
                transSz = dataConnection.transferFromClient(session.getFtpletSession(), outStream);

                // attempt to close the output stream so that errors in
                // closing it will return an error to the client (FTPSERVER-119)
                if(outStream != null) {
View Full Code Here

Examples of org.apache.hadoop.io.compress.CompressionCodec.createOutputStream()

    } else {
      // TODO: will isCompressed() really guard for npe against getCodec()
      Class<?> clazz = ClassUtils.resolveClassName(getCodec().getCodecClass(), getClass().getClassLoader());
      CompressionCodec compressionCodec = (CompressionCodec) ReflectionUtils.newInstance(clazz,
          getConfiguration());
      OutputStream out = compressionCodec.createOutputStream(wout);
      holder.setWrappedStream(wout);
      holder.setStream(out);
    }
    return holder;
  }
View Full Code Here

Examples of org.apache.hadoop.io.compress.CompressionCodec.createOutputStream()

    FileSystem fs = file.getFileSystem(conf);
    FSDataOutputStream fileOut = fs.create(file, false);
    DataOutputStream ostream = fileOut;

    if (isCompressed) {
      ostream = new DataOutputStream(codec.createOutputStream(fileOut));
    }

    return new NoKeyRecordWriter<K, V>(ostream);
  }
}
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.