call.setOutput(new StringRepresentation(output, MediaType.TEXT_PLAIN));
call.setOutput(output, MediaType.TEXT_PLAIN);
   public static void main(String[] args)   {      try      {         // Create the user Restlet         Restlet userRestlet = new Restlet()            {         		public void handleGet(Call call)               {                  // Print the requested URI path                  String output = "Account of user named: " + call.getBaseRef().getLastSegment();                  call.setOutput(new StringRepresentation(output, MediaType.TEXT_PLAIN));               }            };         // Create the orders Restlet         Restlet ordersRestlet = new Restlet()         	{            	public void handleGet(Call call)               {            		// Print the user name of the requested orders                  List<String> segments = call.getBaseRef().getSegments();                  String output = "Orders of user named: " + segments.get(segments.size() - 2);                  call.setOutput(new StringRepresentation(output, MediaType.TEXT_PLAIN));               }            };      	         // Build and start the container      	Builders.buildContainer()      		.addServer(Protocol.HTTP, 8182)      		.attachLog("com.noelios.restlet.example")      			.attachStatus(true, "webmaster@mysite.org", "http://www.mysite.org")      				.attachHost(8182)      					.attachGuard("/docs/", "com.noelios.restlet.example", true, ChallengeScheme.HTTP_BASIC , "Restlet tutorial", true)      						.authorize("scott", "tiger")      						.attachDirectory(ROOT_URI, "index.html").upRouter()   						.attachRouter("/users/[a-z]+")   								.attach("$", userRestlet).upRouter()									.attach("/orders$", ordersRestlet).owner().start();      }      catch(Exception e)      {         e.printStackTrace();      }   }