Package org.apache.xml.security.stax.impl.util

Examples of org.apache.xml.security.stax.impl.util.MultiInputStream


        InputStream is = inputStream;
        try {
            OutputStream outputStream = getOutputStream();
            if (outputStream == null) {
                outputStream = new ByteArrayOutputStream();
                is = new MultiInputStream(
                        new ByteArrayInputStream(
                                ((ByteArrayOutputStream) outputStream).toByteArray()),
                        inputStream
                );
            }
View Full Code Here


                        outputStreamWriter.write("\r\n");
                    }
                }
                outputStreamWriter.write("\r\n");
                outputStreamWriter.close();
                attachmentInputStream = new MultiInputStream(
                        new ByteArrayInputStream(byteArrayOutputStream.toByteArray()),
                        attachment.getSourceStream()
                );
            } catch (UnsupportedEncodingException e) {
                throw new WSSecurityException(WSSecurityException.ErrorCode.FAILED_ENCRYPTION, e);
            } catch (IOException e) {
                throw new WSSecurityException(WSSecurityException.ErrorCode.FAILED_ENCRYPTION, e);
            }
        } else {
            attachmentInputStream = attachment.getSourceStream();
        }

        final ByteArrayInputStream ivInputStream = new ByteArrayInputStream(cipher.getIV());
        final CipherInputStream cipherInputStream = new CipherInputStream(attachmentInputStream, cipher);

        return new MultiInputStream(ivInputStream, cipherInputStream);
    }
View Full Code Here

TOP

Related Classes of org.apache.xml.security.stax.impl.util.MultiInputStream

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.