Examples of UnsyncByteArrayOutputStream


Examples of com.sun.xml.wss.impl.misc.UnsyncByteArrayOutputStream

            _attrs.add(new StAXAttr());
        }
        for(int i=0;i<10;i++){
            elementNames[i] = new ElementName();
        }
        elemBuffer = new UnsyncByteArrayOutputStream();
    }
View Full Code Here

Examples of com.sun.xml.wss.impl.misc.UnsyncByteArrayOutputStream

   
    public void writeStartElement(String prefix, String localName, String namespaceURI) throws XMLStreamException {
       
        closeStartTag();
        elemBuffer.reset();
        UnsyncByteArrayOutputStream buffWriter = null;
        try{
            if(prefix !=null && prefix.length() > 0){
                buffWriter = elementNames[_depth].getUtf8Data();
                writeStringToUtf8(prefix,buffWriter);
                writeStringToUtf8(":",buffWriter);
                writeStringToUtf8(localName,buffWriter);
                _elementPrefix = prefix;
            }else{
                buffWriter = elementNames[_depth].getUtf8Data();
                writeStringToUtf8(localName,buffWriter);
               
            }
        }catch(Exception ex){
            throw new RuntimeException(ex);
        }
       
        //byte [] data = elemBuffer.toByteArray();
        //byte [] data = elemBuffer.getBytes();
        _ncContextState[_depth]=false;
       
       
        _depth++;resize();
        resizeElementStack();
        try {
            _stream .write('<');
           
            _stream.write(buffWriter.getBytes(),0,buffWriter.getLength());
            closeStartTag = true;
        } catch (IOException ex) {
            throw new RuntimeException(ex);
        }
    }
View Full Code Here

Examples of com.sun.xml.wss.impl.misc.UnsyncByteArrayOutputStream

    public EXC14nStAXReaderBasedCanonicalizer() {
        _attrResult = new ArrayList();
        for(int i=0;i<4;i++){
            _attrs.add(new StAXAttr());
        }
        _tmpBuffer = new UnsyncByteArrayOutputStream();
    }
View Full Code Here

Examples of com.sun.xml.wss.impl.misc.UnsyncByteArrayOutputStream

            Iterator mimeHeaders = attachment.getAllMimeHeaders();
            //Revisit ::
            // rf. RFC822
            MimeHeaderCanonicalizer mHCanonicalizer = CanonicalizerFactory.getMimeHeaderCanonicalizer("US-ASCII");
            byte[] outputHeaderBytes = mHCanonicalizer._canonicalize(mimeHeaders);
            OutputStream byteStream = new UnsyncByteArrayOutputStream();
            attachment.getDataHandler().writeTo(byteStream);
            ByteArrayInputStream byteInputStream = new ByteArrayInputStream(((ByteArrayOutputStream)byteStream).toByteArray());
            byteStream.close();
            if(outputStream == null){
                byteStream = new ByteArrayOutputStream();
            }else{
                byteStream = outputStream;
            }
            byteStream.write(outputHeaderBytes);
            Canonicalizer canonicalizer =  CanonicalizerFactory.getCanonicalizer(attachment.getContentType());
            InputStream is = canonicalizer.canonicalize(byteInputStream,byteStream);
            if(is != nullreturn new OctetStreamData(is);
            return null;
        }catch(javax.xml.crypto.dsig.TransformException te){
View Full Code Here

Examples of com.sun.xml.wss.impl.misc.UnsyncByteArrayOutputStream

    private boolean forceDefNS  =false;
    /** Creates a new instance of StAXEC14nCanonicalizerImpl */
    public StAXEXC14nCanonicalizerImpl() {
        super();
        tmpBuffer = new UnsyncByteArrayOutputStream();
    }
View Full Code Here

Examples of org.apache.xml.security.utils.UnsyncByteArrayOutputStream

     */
    public DigesterOutputStream(MessageDigest md, boolean buffer) {
        this.md = md;
  this.buffer = buffer;
  if (buffer) {
      bos = new UnsyncByteArrayOutputStream();
  }
    }
View Full Code Here

Examples of org.apache.xml.security.utils.UnsyncByteArrayOutputStream

     */
    public DigesterOutputStream(MessageDigest md, boolean buffer) {
        this.md = md;
  this.buffer = buffer;
  if (buffer) {
      bos = new UnsyncByteArrayOutputStream();
  }
    }
View Full Code Here

Examples of org.apache.xml.security.utils.UnsyncByteArrayOutputStream

     */
    public DigesterOutputStream(MessageDigest md, boolean buffer) {
        this.md = md;
        this.buffer = buffer;
        if (buffer) {
            bos = new UnsyncByteArrayOutputStream();
        }
    }
View Full Code Here

Examples of org.apache.xml.security.utils.UnsyncByteArrayOutputStream

     */
    public DigesterOutputStream(MessageDigest md, boolean buffer) {
        this.md = md;
        this.buffer = buffer;
        if (buffer) {
            bos = new UnsyncByteArrayOutputStream();
        }
    }
View Full Code Here

Examples of org.apache.xml.security.utils.UnsyncByteArrayOutputStream

     */
    public DigesterOutputStream(MessageDigest md, boolean buffer) {
        this.md = md;
        this.buffer = buffer;
        if (buffer) {
            bos = new UnsyncByteArrayOutputStream();
        }
    }
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.