private void sendFriends(){
  List<String> friends=new ArrayList<String>();
  friends.addAll(friendStore.getAllFriends());
  CleartextFriends friendsMessage=new CleartextFriends((ArrayList<String>)friends);
  JSONObject friendsMessageJson=friendsMessage.toJson();
  lengthValueWrite(out,friendsMessageJson);
}

private void sendFriends ( ) { List < String > friends = new ArrayList < String > ( ) ; friends . addAll ( friendStore . getAllFriends ( ) ) ; CleartextFriends friendsMessage = new CleartextFriends ( ( ArrayList < String > ) friends ) ; JSONObject friendsMessageJson = friendsMessage . toJson ( ) ; lengthValueWrite ( out , friendsMessageJson ) ; }
get friends from the friendstore , encode them as a cleartextfriends protobuf object , and write that message out to the output stream . todo ( lerner ) : limit the number of friends used .
