Examples of OutputStreamWrapper


Examples of com.sun.xml.ws.security.opt.impl.util.OutputStreamWrapper

     * @param eos OutputStream
     * @throws IOException
     */
    public void encryptData(OutputStream eos) throws IOException{
        try{
            OutputStreamWrapper outputStream = new OutputStreamWrapper(eos);
            if(encryptedDataCV != null){
                outputStream.write(encryptedDataCV);
                return;
            }
            //  Thread.dumpStack();
            if(cipher == null){
                initCipher();
            }
            //Base64OutputStream bos = new Base64OutputStream(outputStream);
            //TODO :: Wrap outputstream with base64 encoder
            CipherOutputStream cos = new CipherOutputStream(outputStream,cipher);
            //BufferedStreamWriter bsw = new BufferedStreamWriter(cos);
            byte [] iv = cipher.getIV();
            outputStream.write(iv);
            outputStream.flush();
            if(data instanceof JAXBData){
                ((JAXBData)data).writeTo(cos);// write in chucks
            }else if(data instanceof StreamWriterData){
                StAXC14nCanonicalizerImpl exc14n = new StAXEXC14nCanonicalizerImpl();
                //((StAXEXC14nCanonicalizerImpl)exc14n).setInclusivePrefixList(new ArrayList());
View Full Code Here

Examples of com.sun.xml.ws.security.opt.impl.util.OutputStreamWrapper

     * @param eos OutputStream
     * @throws IOException
     */
    public void encryptData(OutputStream eos) throws IOException{
        try{
            OutputStreamWrapper outputStream = new OutputStreamWrapper(eos);
            if(encryptedDataCV != null){
                outputStream.write(encryptedDataCV);
                return;
            }
            //  Thread.dumpStack();
            if(cipher == null){
                initCipher();
            }
            //Base64OutputStream bos = new Base64OutputStream(outputStream);
            //TODO :: Wrap outputstream with base64 encoder
            CipherOutputStream cos = new CipherOutputStream(outputStream,cipher);
            //BufferedStreamWriter bsw = new BufferedStreamWriter(cos);
            byte [] iv = cipher.getIV();
            outputStream.write(iv);
            outputStream.flush();
            if(data instanceof JAXBData){
                ((JAXBData)data).writeTo(cos);// write in chucks
            }else if(data instanceof StreamWriterData){
                StAXC14nCanonicalizerImpl exc14n = new StAXEXC14nCanonicalizerImpl();
                //((StAXEXC14nCanonicalizerImpl)exc14n).setInclusivePrefixList(new ArrayList());
View Full Code Here

Examples of org.apache.harmony.x.imageio.internal.OutputStreamWrapper

    private OutputStream wrapOutput(Object output) {
    if(output instanceof OutputStream) {
      return (OutputStream)output;
    } else if(output instanceof ImageOutputStream){
      return new OutputStreamWrapper((ImageOutputStream) output);
    } else {
      throw new UnsupportedOperationException(output.getClass().getName());
    }
  }
View Full Code Here

Examples of org.apache.jdo.impl.enhancer.OutputStreamWrapper

    public boolean enhanceClassFile(InputStream in,
                                    OutputStream out)
        throws EnhancerUserException,
        EnhancerFatalError
    {
        return enhanceClassFile(in, new OutputStreamWrapper(out));
    }
View Full Code Here

Examples of org.apache.jdo.impl.enhancer.OutputStreamWrapper

        try {
            final File temp = File.createTempFile("enhancer", ".class");
            out = new BufferedOutputStream(new FileOutputStream(temp));

            //enhance
            final OutputStreamWrapper wrapper = new OutputStreamWrapper(out);
            final boolean enhanced = enhancer.enhanceClassFile(in, wrapper);

            closeOutputStream(out);
            out = null;
            createOutputFile(enhanced,
                             createClassFileName(wrapper.getClassName()),
                             temp);
        } finally {
            closeInputStream(in);
            closeOutputStream(out);
        }
View Full Code Here

Examples of org.apache.jdo.impl.enhancer.OutputStreamWrapper

        try {
            final File temp = File.createTempFile("enhancer", ".class");
            out = new BufferedOutputStream(new FileOutputStream(temp));

            //enhance
            final OutputStreamWrapper wrapper = new OutputStreamWrapper(out);
            final boolean enhanced = enhancer.enhanceClassFile(in, wrapper);

            closeOutputStream(out);
            out = null;
            createOutputFile(enhanced,
                             getClassFileName(wrapper.getClassName()), temp);
        } finally {
            closeInputStream(in);
            closeOutputStream(out);
        }
    }
View Full Code Here

Examples of org.apache.jdo.impl.enhancer.OutputStreamWrapper

        try {
            final File temp = File.createTempFile("enhancer", ".class");
            out = new BufferedOutputStream(new FileOutputStream(temp));

            //enhance
            final OutputStreamWrapper wrapper = new OutputStreamWrapper(out);
            final boolean enhanced = enhancer.enhanceClassFile(in, wrapper);

            closeOutputStream(out);
            out = null;
            createOutputFile(enhanced,
                             createClassFileName(wrapper.getClassName()),
                             temp);
        } finally {
            closeInputStream(in);
            closeOutputStream(out);
        }
View Full Code Here

Examples of org.apache.jdo.impl.enhancer.OutputStreamWrapper

    public boolean enhanceClassFile(InputStream in,
                                    OutputStream out)
        throws EnhancerUserException,
        EnhancerFatalError
    {
        return enhanceClassFile(in, new OutputStreamWrapper(out));
    }
View Full Code Here

Examples of org.apache.jdo.impl.enhancer.OutputStreamWrapper

        try {
            final File temp = File.createTempFile("enhancer", ".class");
            out = new BufferedOutputStream(new FileOutputStream(temp));

            //enhance
            final OutputStreamWrapper wrapper = new OutputStreamWrapper(out);
            final boolean enhanced = enhancer.enhanceClassFile(in, wrapper);

            closeOutputStream(out);
            out = null;
            createOutputFile(enhanced,
                             getClassFileName(wrapper.getClassName()), temp);
        } finally {
            closeInputStream(in);
            closeOutputStream(out);
        }
    }
View Full Code Here

Examples of org.apache.maven.doxia.wrapper.OutputStreamWrapper

            ByteArrayOutputStream outputStream = new ByteArrayOutputStream();

            InputReaderWrapper input =
                InputReaderWrapper.valueOf( new FileReader( inFile ), from, converter.getInputFormats() );
            OutputStreamWrapper output = OutputStreamWrapper.valueOf( outputStream, to, "UTF-8", converter.getOutputFormats() );

            converter.setFormatOutput( formatOutput );
            converter.convert( input, output );

            IOUtil.copy( outputStream.toByteArray(), fo );
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.