Package org.jboss.fresh.io

Examples of org.jboss.fresh.io.BufferObjectWriter


    RegistryContext ctx = new RegistryContext();


    if (g) {
      BufferObjectWriter oout = new BufferObjectWriter(getStdOut());
      Object o = null;

      try {
        o = ctx.lookup(name);
      } catch (NamingException ex) {
        if (tex)
          throw new RuntimeException(ex);
        else
          out.print("Name not bound: " + name);
        return;
      }

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

    if (l) {
      BufferObjectWriter oout = new BufferObjectWriter(getStdOut());
      Object o = ctx.lookup(name);
      if (!(o instanceof Context)) {
        if (tex)
          throw new RuntimeException("Object is not instance of Context. Can't list it. : " + name);
        else
View Full Code Here


        break;

      case GET:
        {
          // unbind one by one
          BufferObjectWriter objout = new BufferObjectWriter(getStdOut());

          Iterator it = names.iterator();
          while (it.hasNext()) {
            String name = String.valueOf(it.next());
            Object obj = ctx.get(name);

            objout.writeObject(obj);
          }

          objout.close();
        }
        break;


      case LIST:
View Full Code Here

   /**
    * Displays version information.
    */
   public void process(String exename, String[] params) throws Exception
   {
      BufferObjectWriter oout = new BufferObjectWriter(getStdOut());
      oout.writeObject(Version.getDescription());
      oout.close();
   }
View Full Code Here

TOP

Related Classes of org.jboss.fresh.io.BufferObjectWriter

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.