Package br.net.woodstock.rockframework.io

Examples of br.net.woodstock.rockframework.io.ByteArrayWriter


        TransformerFactory transformerFactory = TransformerFactory.newInstance();
        Transformer transformer = transformerFactory.newTransformer();
        transformer.transform(new DOMSource(document), domResult);

        ByteArrayWriter writer = new ByteArrayWriter();
        XmlWriter.getInstance().write(outputDocument, writer, Charset.defaultCharset());

        currentData = writer.toByteArray();
      }
      return currentData;
    } catch (Exception e) {
      throw new SignerException(e);
    }
View Full Code Here


        TransformerFactory transformerFactory = TransformerFactory.newInstance();
        Transformer transformer = transformerFactory.newTransformer();
        transformer.transform(new DOMSource(document), domResult);

        ByteArrayWriter writer = new ByteArrayWriter();
        XmlWriter.getInstance().write(outputDocument, writer, Charset.defaultCharset());

        currentData = writer.toByteArray();
      }
      return currentData;
    } catch (Exception e) {
      throw new SignerException(e);
    }
View Full Code Here

        DOMSignContext signContext = new DOMSignContext(privateKey, document.getDocumentElement());
        XMLSignature signature = this.xmlSignatureFactory.newXMLSignature(this.signedInfo, this.keyInfo);

        signature.sign(signContext);

        ByteArrayWriter writer = new ByteArrayWriter();
        StreamResult streamResult = new StreamResult(writer);

        TransformerFactory transformerFactory = TransformerFactory.newInstance();
        Transformer transformer = transformerFactory.newTransformer();
        transformer.transform(new DOMSource(document), streamResult);

        currentData = writer.toByteArray();
      }
      return currentData;
    } catch (Exception e) {
      throw new SignerException(e);
    }
View Full Code Here

        TransformerFactory transformerFactory = TransformerFactory.newInstance();
        Transformer transformer = transformerFactory.newTransformer();
        transformer.transform(new DOMSource(document), domResult);

        ByteArrayWriter writer = new ByteArrayWriter();
        XmlWriter.getInstance().write(outputDocument, writer, Charset.defaultCharset());

        currentData = writer.toByteArray();
      }
      return currentData;
    } catch (Exception e) {
      throw new SignerException(e);
    }
View Full Code Here

TOP

Related Classes of br.net.woodstock.rockframework.io.ByteArrayWriter

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.