public static void silentCloseInputStream(InputStream is){
  try {
    if (is != null) {
      is.close();
    }
  }
 catch (  IOException e) {
    Log.w(LOG_TAG,"Cannot close input stream",e);
  }
}

public static void silentCloseInputStream ( InputStream is ) { try { if ( is != null ) { is . close ( ) ; } } catch ( IOException e ) { Log . w ( LOG_TAG , "Cannot close input stream" , e ) ; } }
a utility function to close an input stream without raising an exception .
