Package org.jboss.fresh.io

Examples of org.jboss.fresh.io.BufferObjectWriter.writeObject()


        HistoryItem hi = (HistoryItem) it.next();

        if(objs) {
          if(oout == null)
            oout = new BufferObjectWriter(getStdOut());
          oout.writeObject(pout);
        } else {
          StringBuffer sb = new StringBuffer();
          if(time) {
            sb.append(sdf.format(new Date(hi.getTime())));
            sb.append(" ");
View Full Code Here


    // if no params, just let through everything
    // if type param, do some filtering.
    if (params.length == 0) {
      log.info("No parameters specified. Just piping through.");
      while (!oin.isFinished()) {
        oout.writeObject(oin.readObject());
      }
      oout.close();
      log.debug("done");
      return;
    }
View Full Code Here

          log.debug(finf.getFileName() + "  ok? : " + ok);
          if (!ok) break;
        }
      }

      if (ok) oout.writeObject(finf);
    }

    oout.close();

    log.debug("done");
View Full Code Here

      obj = in.readObject();
      // process input stream
      if (obj == null) {
        if (forceString) {
          log.debug("Object is null. Outputing empty String.");
          out.writeObject("");
        } else {
          log.debug("Object is null. Outputing empty Document.");
          out.writeObject(XMLHelper.getDocument());
        }
      } else if (obj instanceof Document) {
View Full Code Here

        if (forceString) {
          log.debug("Object is null. Outputing empty String.");
          out.writeObject("");
        } else {
          log.debug("Object is null. Outputing empty Document.");
          out.writeObject(XMLHelper.getDocument());
        }
      } else if (obj instanceof Document) {
        if (forceDOM) {
          log.debug("Object is Document. Forced output to DOM, so just returning it.");
          if (log_xml.isDebugEnabled()) {
View Full Code Here

        if (forceDOM) {
          log.debug("Object is Document. Forced output to DOM, so just returning it.");
          if (log_xml.isDebugEnabled()) {
            log_xml.debug("Document -> Document: " + XMLHelper.getXML((Document) obj));
          }
          out.writeObject(obj);
        } else {
          try {
            String s = XMLHelper.getXML((Document) obj);
            log.debug("Object is Document. Returning string.");
            log_xml.debug("Document -> String: " + s);
View Full Code Here

        } else {
          try {
            String s = XMLHelper.getXML((Document) obj);
            log.debug("Object is Document. Returning string.");
            log_xml.debug("Document -> String: " + s);
            out.writeObject(s);
          } catch (IOException e) {
            log.error("Could not parse input Document into string! Weird.", e);
            if (err == null) {
              throw new RuntimeException("Could not parse input Document into string! Weird.", e);
            } else {
View Full Code Here

        if (forceDOM) {
          log.debug("Object is Element. Forced output to DOM, so just returning it.");
          if (log_xml.isDebugEnabled()) {
            log_xml.debug("Element -> Element: " + XMLHelper.getXML((Element) obj));
          }
          out.writeObject(obj);
        } else {
          try {
            String s = XMLHelper.getXML((Element) obj);
            log.debug("Object is Element. Returning string.");
            log_xml.debug("Element -> String: " + s);
View Full Code Here

        } else {
          try {
            String s = XMLHelper.getXML((Element) obj);
            log.debug("Object is Element. Returning string.");
            log_xml.debug("Element -> String: " + s);
            out.writeObject(s);
          } catch (IOException e) {
            log.error("Could not parse input Element into string! Weird.", e);
            if (err == null) {
              throw new RuntimeException("Could not parse input Element into string! Weird.", e);
            } else {
View Full Code Here

        if (forceDOM) {
          log.debug("Object is DocumentFragment. Forced output to DOM, so just returning it.");
          if (log_xml.isDebugEnabled()) {
            log_xml.debug("DocumentFragment -> DocumentFragment: " + XMLHelper.getXML((DocumentFragment) obj));
          }
          out.writeObject(obj);
        } else {
          try {
            String s = XMLHelper.getXML((DocumentFragment) obj);
            log.debug("Object is DocumentFragment. Returning string.");
            log_xml.debug("DocumentFragment -> String: " + s);
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.