Esempio n. 1
0
 /**
  * A utility method to make a name=value part of the adde request string
  *
  * @param buf The buffer to append to
  * @param name The property name
  * @param value The value
  */
 protected void appendKeyValue(StringBuffer buf, String name, String value) {
   if ((buf.length() == 0) || (buf.charAt(buf.length() - 1) != '?')) {
     buf.append("&");
   }
   buf.append(name);
   buf.append("=");
   buf.append(value);
 }
Esempio n. 2
0
  private void onReceiveChar(char character) {

    buffer.append(character);

    if (buffer.charAt(buffer.length() - 1) == '\n') {
      onReceiveLine(buffer.toString());
      buffer.delete(0, buffer.length());
    }
  }