Package org.apache.oodt.commons.io

Examples of org.apache.oodt.commons.io.NullOutputStream


    return new ByteArrayInputStream(baos.toByteArray());
  }

  public long sizeOf(Object obj) {
    try {
      CountingOutputStream c = new CountingOutputStream(new NullOutputStream());
      ObjectOutputStream stream = new ObjectOutputStream(c);
      stream.writeObject(obj);
      stream.close();
      return c.getBytesWritten();
    } catch (IOException ex) {
View Full Code Here


    return new ByteArrayInputStream(baos.toByteArray());
  }

  public long sizeOf(Object obj) {
    try {
      CountingOutputStream c = new CountingOutputStream(new NullOutputStream());
      ObjectOutputStream stream = new ObjectOutputStream(c);
      stream.writeObject(obj);
      stream.close();
      return c.getBytesWritten();
    } catch (IOException ex) {
View Full Code Here

    Document doc = XML.createDocument();
    Node root = e.toXML(doc);
    TransformerFactory tf = TransformerFactory.newInstance();
    Transformer t = tf.newTransformer();
    DOMSource s = new DOMSource(root);
    StreamResult r = new StreamResult(new NullOutputStream());
    t.transform(s, r);
  }
View Full Code Here

    Document doc = XML.createDocument();
    Node root = p.toXML(doc);
    TransformerFactory tf = TransformerFactory.newInstance();
    Transformer t = tf.newTransformer();
    DOMSource s = new DOMSource(root);
    StreamResult r = new StreamResult(new NullOutputStream());
    t.transform(s, r);
  }
View Full Code Here

    Document doc = XML.createDocument();
    Node root = ra.toXML(doc);
    TransformerFactory tf = TransformerFactory.newInstance();
    Transformer t = tf.newTransformer();
    DOMSource s = new DOMSource(root);
    StreamResult r = new StreamResult(new NullOutputStream());
    t.transform(s, r);
  }
View Full Code Here

    Document doc = XML.createDocument();
    Node root = e.toXML(doc);
    TransformerFactory tf = TransformerFactory.newInstance();
    Transformer t = tf.newTransformer();
    DOMSource s = new DOMSource(root);
    StreamResult r = new StreamResult(new NullOutputStream());
    t.transform(s, r);
  }
View Full Code Here

TOP

Related Classes of org.apache.oodt.commons.io.NullOutputStream

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.