Пример #1
0
 @DSComment("Private Method")
 @DSBan(DSCat.PRIVATE_METHOD)
 @DSGenerator(
     tool_name = "Doppelganger",
     tool_version = "2.0",
     generated_on = "2013-12-30 12:33:25.523 -0500",
     hash_original_method = "365F60E44B7DA4848E76578B1D312F6F",
     hash_generated_method = "D50175F96A203B6C6D18C23FC2D8164A")
 private void flushBuilder() {
   if (mBuilder.length() > 0) {
     Log.println_native(mBuffer, mPriority, mTag, mBuilder.toString());
     mBuilder.delete(0, mBuilder.length());
   }
 }
 /**
  * Returns a String that is suitable for use as an <code>application/x-www-form-urlencoded</code>
  * list of parameters in an HTTP PUT or HTTP POST.
  *
  * @param parameters The parameters to include.
  * @param encoding The encoding to use.
  */
 @DSGenerator(
     tool_name = "Doppelganger",
     tool_version = "2.0",
     generated_on = "2013-12-30 13:01:44.463 -0500",
     hash_original_method = "FC50720DD3E5D2157039A2F08974D046",
     hash_generated_method = "DDE2DF273A0113D2EC3E0F3A3C8BCEAE")
 public static String format(
     final List<? extends NameValuePair> parameters, final String encoding) {
   final StringBuilder result = new StringBuilder();
   for (final NameValuePair parameter : parameters) {
     final String encodedName = encode(parameter.getName(), encoding);
     final String value = parameter.getValue();
     final String encodedValue = value != null ? encode(value, encoding) : "";
     if (result.length() > 0) result.append(PARAMETER_SEPARATOR);
     result.append(encodedName);
     result.append(NAME_VALUE_SEPARATOR);
     result.append(encodedValue);
   }
   return result.toString();
 }