public static String readAndCloseQuietly(InputStream inputStream) throws IOException {
  try {
    return readStream(inputStream);
  }
 catch (  IOException e) {
    LOG.error(e.getLocalizedMessage(),e);
    throw e;
  }
 finally {
    if (inputStream != null) {
      try {
        inputStream.close();
      }
 catch (      IOException e) {
        LOG.error(e.getLocalizedMessage(),e);
      }
    }
  }
}

public static String readAndCloseQuietly ( InputStream inputStream ) throws IOException { try { return readStream ( inputStream ) ; } catch ( IOException e ) { LOG . error ( e . getLocalizedMessage ( ) , e ) ; throw e ; } finally { if ( inputStream != null ) { try { inputStream . close ( ) ; } catch ( IOException e ) { LOG . error ( e . getLocalizedMessage ( ) , e ) ; } } } }
reads bytes from input stream and builds a string from them . inputstream closed after consumption .
