GenericCall call = new GenericCall();
Call call = new GenericCall();
   public static void main(String[] args)   {      try      {         // Prepare the REST call      	GenericCall call = new GenericCall();         call.setResourceRef("http://localhost:8182/");         call.setMethod(Methods.GET);                  // Add the client authentication to the call          ChallengeResponse authentication = new ChallengeResponse(ChallengeSchemes.HTTP_BASIC, "scott", "tiger");         call.getSecurity().setChallengeResponse(authentication);         // Ask to the HTTP client connector to handle the call         Client client = new GenericClient(Protocols.HTTP, "My client");         client.handle(call);         if(call.getStatus().equals(Statuses.SUCCESS_OK))         {            // Output the result representation on the JVM console            Representation output = call.getOutput();            output.write(System.out);         }         else if(call.getStatus().equals(Statuses.CLIENT_ERROR_UNAUTHORIZED))         {            // Unauthorized access            System.out.println("Your access was not authorized by the server, check your credentials");         }      }      catch(IOException e)      {         e.printStackTrace();      }   }