title: I don't understand these codes
body: <p>I'm making an android app for my final project at school. 
  I only know basic Java and I need to make my app connect to my mysql database.</p>
  
  <p>So I followed this tutorial here with the get method:</p>
  
  <p><a href="https://www.tutorialspoint.com/android/android_php_mysql.htm" rel="nofollow noreferrer">https://www.tutorialspoint.com/android/android_php_mysql.htm</a></p>
  
  <p>Aside from the php part and how it connects and execute the code what I don't understand is this line</p>
  
  <pre><code>StringBuffer sb = new StringBuffer("");
  String line="";
  
  while ((line = in.readLine()) != null) {
      sb.append(line);
      break;
  }
  
  in.close();
  return sb.toString();
  </code></pre>
  
  <p>I tried to read this:</p>
  
  <p><a href="https://developer.android.com/reference/java/lang/StringBuffer.html" rel="nofollow noreferrer">https://developer.android.com/reference/java/lang/StringBuffer.html</a></p>
  
  <p>But I suck at English and reading that won't make me understand what StringBuffer do a bit. I only know that it returns something and it is converted to string type so I think it is the php result.</p>
  
  <p>What I want to know is what does StringBuffer do in the tutorial above? Like they return the value of the php result or not?</p>
  
  <p>And if they do can I use it like this? Because I tried to do like this but got a catch (Exception e) with e.getMessage is null</p>
  
  <pre><code>TextView text2 = (TextView) findViewById(R.id.textView);
  text2.setText(sb.toString());
  </code></pre>
  
  <p>If they do not, how can I set the result of the php value to my textview?</p>