Package org.jboss.fresh.io

Examples of org.jboss.fresh.io.BufferObjectReader.readObject()


    // 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


      }
    }

    // now we do ...
    while (!oin.isFinished()) {
      FileInfo finf = (FileInfo) oin.readObject();

      boolean ok = false;

      for (int i = 0; i < filters.length; i++) {
        String fld = filters[i].getFieldName();
View Full Code Here

    BufferObjectReader in = new BufferObjectReader(getStdIn());
    BufferObjectWriter out = new BufferObjectWriter(getStdOut());

    Object obj;
    while (!in.isFinished()) {
      obj = in.readObject();
      // process input stream
      if (obj == null) {
        if (forceString) {
          log.debug("Object is null. Outputing empty String.");
          out.writeObject("");
View Full Code Here

    Object ret = new Object();

    BufferObjectReader in = new BufferObjectReader(getStdIn());
    BufferObjectWriter out = new BufferObjectWriter(getStdOut());

    Object[] input = (Object[]) in.readObject();

    System.out.println("Input Object[] is: " + String.valueOf(input));

    Object[] cons_params = (Object[]) input[0];
    System.out.println("Constructor params is: " + String.valueOf(cons_params));
View Full Code Here

        } while (read.more);
      }

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

    }
View Full Code Here

      while (!in.isFinished()) { // �e ho�emo, da sa izvede do konca moramo prebrati vse  -  dokler se ne zapre.
        try {

          if (retObj == null) {
//log.debug("########\n\n\n\\n Timeout: " + in.getTimeout());
            retObj = in.readObject()// read it
          } else {
//log.debug("########\n\n\n\\n Timeout_1: " + in.getTimeout());
            in.readObject()// dump it
          }
        } catch (IOException ex) {
View Full Code Here

          if (retObj == null) {
//log.debug("########\n\n\n\\n Timeout: " + in.getTimeout());
            retObj = in.readObject()// read it
          } else {
//log.debug("########\n\n\n\\n Timeout_1: " + in.getTimeout());
            in.readObject()// dump it
          }
        } catch (IOException ex) {
//log.debug("[ShellImpl] executeAsObject:");
          log.error(ex.getMessage(), ex);
        }
View Full Code Here

    GZIPOutputStream gout = new GZIPOutputStream(out);
    ObjectOutputStream oout = new ObjectOutputStream(gout);
    Object obj;
    try {
      while( !in.isFinished() ) {
        obj = in.readObject();
        oout.writeObject(obj);
        oout.flush();
        gout.flush();
        out.flush();
      }
View Full Code Here

            String factoryCName = null;

            if(spiObjectFactory == null || "StaticStore".equals(spiObjectFactory)) {
                BufferObjectReader oin = new BufferObjectReader(getStdIn());
                if(!oin.isFinished()) {
                    o = oin.readObject();
                }
            } else if("JNDI2Registry".equals(spiObjectFactory)) {
                o = new RegistryContext().lookup((String) spiParams.get(1));
                factoryCName = org.jboss.fresh.registry.JNDI2RegistryResolverFactory.class.getName();
            } else if("StaticStore".equals(spiObjectFactory)) {
View Full Code Here

        if (vals != null) {
            for (int i = 0; i < vals.length; i++) {

                if (!oin.isFinished())
                    vals[i] = oin.readObject();
                else if (canThrowEx()) {
                    throw new Exception("Not enough input objects on stdin.");
                } else {
                    out.println("Not enough input objects on stdin.");
                    return;
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.