Android Open Source - base_app Utils






From Project

Back to project page base_app.

License

The source code is released under:

GNU General Public License

If you think the Android project base_app listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.bengui.baseapp.utils;
/*from  ww w  .  jav  a  2  s .  c  o m*/
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;


public class Utils {

  
  public static String inputStreamToString(InputStream is) {
     
    BufferedReader br = null;
    StringBuilder sb = new StringBuilder();
 
    String line;
    try {
 
      br = new BufferedReader(new InputStreamReader(is));
      while ((line = br.readLine()) != null) {
        sb.append(line);
      }
 
    } catch (IOException e) {
      e.printStackTrace();
    } finally {
      if (br != null) {
        try {
          br.close();
        } catch (IOException e) {
          e.printStackTrace();
        }
      }
    }
 
    return sb.toString();
 
  }
  
  public static boolean validateFields(){
    //TODO: Add validate fields
    
    
    return true;
    
  }
  
}




Java Source Code List

com.bengui.baseapp.MainActivity.java
com.bengui.baseapp.gcm.GCMManager.java
com.bengui.baseapp.gcm.GcmBroadcastReceiver.java
com.bengui.baseapp.gcm.GcmIntentService.java
com.bengui.baseapp.models.Contact.java
com.bengui.baseapp.services.HttpClient.java
com.bengui.baseapp.services.ServerException.java
com.bengui.baseapp.services.ServiceException.java
com.bengui.baseapp.utils.Constants.java
com.bengui.baseapp.utils.JSONParcelableObject.java
com.bengui.baseapp.utils.JSONUtils.java
com.bengui.baseapp.utils.Utils.java