Package org.jboss.fresh.io

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


      }

      it = result.iterator();
      while (it.hasNext()) {
        Object obj = it.next();
        oout.writeObject(obj);
        System.out.println(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();
            bin.close();
View Full Code Here

                else
                    out.print("Name not bound: " + name);
                return;
            }

            oout.writeObject(o);
            oout.flush();
            return;
        }

        if (l) {
View Full Code Here

      return;
    }

    // write object
    BufferObjectWriter oout = new BufferObjectWriter(getStdOut());
    oout.writeObject(image);
    oout.close();

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

          jpegEncoder.encode(newImage);
          os.close();
*/
        } else { // OBJ_TYPE
          BufferObjectWriter oout = new BufferObjectWriter(getStdOut());
          oout.writeObject(newImage);
          oout.close();
        }

        return;
      }
View Full Code Here

        if (tmp.equals("e")) {
          // get command
          String param = params[++i];

          BufferObjectWriter bout = new BufferObjectWriter(getStdOut());
          bout.writeObject(URLEncoder.encode(param, "utf-8"));
          bout.close();

        } else if (tmp.equals("d")) {

          String param = params[++i];
View Full Code Here

        } else if (tmp.equals("d")) {

          String param = params[++i];

          BufferObjectWriter bout = new BufferObjectWriter(getStdOut());
          bout.writeObject(URLDecoder.decode(param, "utf-8"));
          bout.close();

        } else {
          if (canThrowEx()) {
            throw new Exception("Unknown command: " + tmp);
View Full Code Here

    if (outType.equals(IMG_TYPE)) {
      BufferOutputStream bos = new BufferOutputStream(getStdOut());
      ImageIO.write(newImage, "jpg", bos);
      bos.close();
    } else { // OBJ_TYPE
      oout.writeObject(newImage);
      oout.close();
    }

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

      getShell().executeAsObject("exec /projects/" + params[0] + "/project-init.rc");
      getShell().setEnvProperty("PROJECT", params[0]);
      // otherwise display the current project
    } else {
      BufferObjectWriter bout = new BufferObjectWriter(getStdOut());
      bout.writeObject(getShell().getEnvProperty("PROJECT"));
      bout.close();
    }

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

        else
          out.print("Name not bound: " + name);
        return;
      }

      oout.writeObject(o);
      oout.close();
      return;
    }

    if (l) {
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.