Java StringBuilder.setEntity Examples

Java StringBuilder.setEntity - 2 examples found. These are the top rated real world Java examples of StringBuilder.setEntity extracted from open source projects. You can rate examples to help us improve the quality of examples.
 public static HttpOperation createMediaPutRequest(HttpOperationClient httpoperationclient, StringBuilder stringbuilder, HttpOperationReader httpoperationreader, HttpEntity httpentity, VineAPI vineapi)
 {
     stringbuilder = new HttpPut(stringbuilder.toString());
     if (httpentity != null)
     {
         stringbuilder.setEntity(httpentity);
     }
     httpoperationclient = new HttpOperation(httpoperationclient, stringbuilder, httpoperationreader, vineapi);
     vineapi.addSessionKeyAuthHeader(httpoperationclient);
     return httpoperationclient;
 }
 public static HttpOperation createPostRequest(HttpOperationClient httpoperationclient, StringBuilder stringbuilder, ArrayList arraylist, HttpOperationReader httpoperationreader, VineAPI vineapi)
 {
     stringbuilder = new HttpPost(stringbuilder.toString());
     if (arraylist != null)
     {
         try
         {
             stringbuilder.setEntity(new UrlEncodedFormEntity(arraylist, "UTF-8"));
         }
         // Misplaced declaration of an exception variable
         catch (ArrayList arraylist)
         {
             arraylist.printStackTrace();
         }
     }
     return new HttpOperation(httpoperationclient, stringbuilder, httpoperationreader, vineapi);
 }