Examples of createOutputStream()


Examples of org.apache.sshd.common.file.SshFile.createOutputStream()

        if (file.doesExist() && file.isDirectory()) {
            throw new IOException("File is a directory: " + file);
        } else if (file.doesExist() && !file.isWritable()) {
            throw new IOException("Can not write to file: " + file);
        }
        OutputStream os = file.createOutputStream(0);
        try {
            ack();

            byte[] buffer = new byte[8192];
            while (length > 0) {
View Full Code Here

Examples of org.apache.sshd.server.SshFile.createOutputStream()

        }
        else if ( file.doesExist() && !file.isWritable() )
        {
            throw new IOException( "Can not write to file: " + file );
        }
        OutputStream os = file.createOutputStream( 0 );
        try
        {
            ack();

            byte[] buffer = new byte[8192];
View Full Code Here

Examples of org.apache.sshd.server.SshFile.createOutputStream()

                    Handle p = handles.get(handle);
                    if (!(p instanceof FileHandle)) {
                        sendStatus(id, SSH_FX_INVALID_HANDLE, handle);
                    } else {
                        SshFile sshFile = ((FileHandle) p).getFile();
                        OutputStream os = sshFile.createOutputStream(offset);
                       
                        try {
                            os.write(data); // TODO: handle append flags
                        } finally {
                            if (os != null) {
View Full Code Here

Examples of org.eclipse.emf.ecore.resource.URIConverter.createOutputStream()

      if (response == null)
      {
        response = new HashMap<Object, Object>();
      }
      URIConverter uriConverter = getURIConverter();
      OutputStream outputStream = uriConverter.createOutputStream(getURI(), new ExtensibleURIConverterImpl.OptionsMap(URIConverter.OPTION_RESPONSE, response, options));
      try
      {
        save(outputStream, options);
      }
      finally
View Full Code Here

Examples of org.pdfbox.pdmodel.common.PDStream.createOutputStream()

            }
            PDStream iccData = pdCS.getPDStream();
            OutputStream output = null;
            try
            {
                output = iccData.createOutputStream();
                output.write( ics.getProfile().getData() );
            }
            finally
            {
                if( output != null )
View Full Code Here

Examples of org.pdfbox.pdmodel.common.PDStream.createOutputStream()

                        }
                        newTokens.add( token );
                       
                    }
                    PDStream newContents = new PDStream( document );
                    ContentStreamWriter writer = new ContentStreamWriter( newContents.createOutputStream() );
                    writer.writeTokens( newTokens );
                    newContents.addCompression();
                    page.setContents( newContents );
                }
                document.save( args[1] );
View Full Code Here

Examples of org.pdfbox.pdmodel.common.PDStream.createOutputStream()

                contentsToAppend.setFilters( filters );
            }
           
            // Sets the compoundStream as page contents
            sourcePage.setContents( new PDStream(compoundStream) );
            output = contentsToAppend.createOutputStream();
        }
        else
        {       
            PDStream contents = new PDStream( document );
            if( compress )
View Full Code Here

Examples of org.pdfbox.pdmodel.common.PDStream.createOutputStream()

                List filters = new ArrayList();
                filters.add( COSName.FLATE_DECODE );
                contents.setFilters( filters );
            }
            sourcePage.setContents( contents );
            output = contents.createOutputStream();           
        }
        formatDecimal.setMaximumFractionDigits( 10 );
        formatDecimal.setGroupingUsed( false );
    }
   
View Full Code Here

Examples of org.pdfbox.pdmodel.common.PDStream.createOutputStream()

                    }
                }
                //now that the tokens are updated we will replace the
                //page content stream.
                PDStream updatedStream = new PDStream(doc);
                OutputStream out = updatedStream.createOutputStream();
                ContentStreamWriter tokenWriter = new ContentStreamWriter(out);
                tokenWriter.writeTokens( tokens );
                page.setContents( updatedStream );
            }
            doc.save( outputFile );
View Full Code Here

Examples of org.pdfbox.pdmodel.common.PDStream.createOutputStream()

                }
            } // For each page token

            // We replace original page content by the edited one.
            PDStream updatedPageContents = new PDStream(inputFile);
            ContentStreamWriter contentWriter = new ContentStreamWriter( updatedPageContents.createOutputStream() );
            contentWriter.writeTokens( editedPageTokens );
            currentPage.setContents( updatedPageContents );

        } // For each document page           
    }
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.