picview/src/com/google/android/apps/picview/request/CachedWebRequestFetcher.java
private static String readStringFromStream(InputStream stream) {
    final int READ_BUFFER = 4096;
    StringBuilder builder = new StringBuilder();
    byte b[] = new byte[READ_BUFFER];
    int l = 0;
    try {
      if (stream == null) {
        return "";
      } else {
        while ((l = stream.read(b)) > 0) {
          builder.append(new String(b, 0, l));
        }
      }
    } catch (IOException ex) {
      ex.printStackTrace();
      return "";
    }
    return builder.toString();
  }
/**
   * Read the content of an {@link InputStream} as String.
   * 
   * @param stream
   *          the stream to read from
   * @return the content of the stream or an empty string, if an error occurs.
   */
Read the content of an  InputStream as String.

@param stream
the stream to read from
@return the content of the stream or an empty string, if an error occurs.
Read the content of an InputStream as String . @param stream the stream to read from @return the content of the stream or an empty string if an error occurs .
private static String readStringFromStream(InputStream stream) {
    final int READ_BUFFER = 4096;
    StringBuilder builder = new StringBuilder();
    byte b[] = new byte[READ_BUFFER];
    int l = 0;
    try {
      if (stream == null) {
        return "";
      } else {
        while ((l = stream.read(b)) > 0) {
          builder.append(new String(b, 0, l));
        }
      }
    } catch (IOException ex) {
      ex.printStackTrace();
      return "";
    }
    return builder.toString();
  }
private static String readStringFromStream ( InputStream stream ) { final int READ_BUFFER = 4096 ; StringBuilder builder = new StringBuilder ( ) ; byte b [ ] = new byte [ READ_BUFFER ] ; int l = 0 ; try { if ( stream == null ) { return "" ; } else { while ( ( l = stream . read ( b ) ) > 0 ) { builder . append ( new String ( b , 0 , l ) ) ; } } } catch ( IOException ex ) { ex . printStackTrace ( ) ; return "" ; } return builder . toString ( ) ; }
Read the content of an {@link InputStream} as String.
Read the content of an { @link InputStream } as String .