Restlet testRestlet = new DefaultRestlet(myContainer)
Restlet testRestlet = new AbstractRestlet(myContainer)
   public static void main(String[] args)   {      try      {         // Create a new Restlet container         RestletContainer myContainer = new RestletContainer("My container");         // Create the HTTP server connector, then add it as a server         // connector to the Restlet container. Note that the container         // is the call restlet.         myContainer.addServer(new DefaultServer(Protocols.HTTP, "My connector", myContainer, 9876));         // Attach a host Maplet as the root handler         HostMaplet rootMaplet = new HostMaplet(myContainer, 9876);         myContainer.attach(rootMaplet);         // Prepare and attach a test Restlet         Restlet testRestlet = new DefaultRestlet(myContainer)         {            public void handlePut(Call call)            {               System.out.println("Handling the call...");               System.out.println("Trying to get the input as a form...");               Form form = call.getInputAsForm();               System.out.println("Trying to getParameters...");               List<Parameter> params = form.getParameters();               StringBuffer sb = new StringBuffer("foo");               for(Parameter p : params)               {                  System.out.println(p);                  sb.append("field name = ");                  sb.append(p.getName());                  sb.append("value = ");                  sb.append(p.getValue());                  sb.append("\n");                  System.out.println(sb.toString());               }               call.setOutput(new StringRepresentation(sb.toString(), MediaTypes.TEXT_PLAIN));            }         };         rootMaplet.attach("/test", testRestlet);         // Now, start the container         myContainer.start();      }      catch(Exception e)      {         e.printStackTrace();      }   }