Code example for PrintStream

Methods: flushprintln

0
	private void updateUserlist(String userlist) {
		mUserlistDisplay.setText(userlist);
	} 
 
	public void send(String message) {
		mOutput.println("SEND");
		mOutput.println(message);
		mOutput.println("STOPSEND");
		mOutput.flush();
		mOutput.println("USERLIST");
	} 
	 
 
 
	private class MessageReceiver extends AsyncTask<Void, String, Boolean> {
		@Override 
		protected Boolean doInBackground(Void... params) {
			String command;
			try { 
				BufferedReader in = new BufferedReader(new InputStreamReader(Connection.mSocket.getInputStream()));
Experience pair programming with AI  Get Codota for Java