Package org.jboss.fresh.io

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


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


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

          out.writeObject(s);
        } else {
          try {
            log.debug("Object is String. Parsing it to DOM Document.");
            log_xml.debug("String -> Document: " + s);
            out.writeObject(XMLHelper.getDocument(s));
          } catch (Exception e) {
            log.error("Could not parse input string into DOM! Probably not a valid XML.", e);
            if (err == null) {
              throw new RuntimeException("Could not parse input string into DOM! Probably not a valid XML.", e);
            } else {
View Full Code Here

        System.out.println("Return Object is: " + String.valueOf(ret));
        break;
      }
    }

    out.writeObject(ret);
  }

  private void usage() {
    System.out.println("Usage: ProxyExe [class] [method] [as stdin an Object[] containing two arrays: params for the constructor and params for the method]");
  }
View Full Code Here

          if (read == null)
            break;

          op.tag = read.tag;
          op.offset += read.buf.length;
          oout.writeObject(read.buf);
        } while (read.more);
      }

    } else {
      while (!oin.isFinished()) {
View Full Code Here

      }

    } else {
      while (!oin.isFinished()) {
        Object obj = oin.readObject();
        oout.writeObject(obj);
//        System.out.println("##[CatExe] writing to out: " + obj);
      }

    }
View Full Code Here

          // register it with the pattern
          ec.registerEventListener(origin, lis, patterns);
         
          BufferObjectWriter boo = new BufferObjectWriter(getStdOut());
          boo.writeObject(origin);
          boo.flush();

        }
        break;
View Full Code Here

    }

    BufferObjectWriter bout = new BufferObjectWriter(getStdOut());

    for (int i = 0; i < params.length; i++) {
      bout.writeObject(params[i]);
    }

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

        it = result.iterator();
        while (it.hasNext()) {
            Object obj = it.next();
//      System.out.println("Writing to out: ");
//      System.out.println(obj);
            oout.writeObject(obj);

        }


        finish:
View Full Code Here

    try {
      boolean eof = false;
      while( !eof ) {
        try {
          obj = oin.readObject();
          out.writeObject(obj);
        } catch (java.io.OptionalDataException ode) {
          if(ode.eof) {
            eof = true;
            oin.close();
            gin.close();
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.