picview/src/com/google/android/apps/picview/data/FileSystemImageCache.java
private synchronized boolean put(URL url, String modified, Bitmap image) {
    if (!imageDb.isReady()) {
      return false;
    }
    Log.i(TAG, "Attempting to put " + url.toString());
    if (imageDb.exists(url)) {
      Log.i(TAG, "ALREADY EXISTS!");
      return false;
    }

    Log.i(TAG, "Putting photo into DB.");
    try {
      return imageDb.put(url, modified, image) != -1;
    } catch (SQLiteDiskIOException ex) {
      Log.w(TAG, "Unable to put photo in DB, disk full or unavailable.");
      return false;
    }
  }
/**
   * Stores the image with the given URL and the modified/version String.
   * 
   * @param url
   *          The URL of the photo to be put.
   * @param modified
   *          The modified/version string.
   * @param image
   *          The image data.
   */
Stores the image with the given URL and the modified/version String.

@param url
The URL of the photo to be put.
@param modified
The modified/version string.
@param image
The image data.
Stores the image with the given URL and the modified / version String . @param url The URL of the photo to be put . @param modified The modified / version string . @param image The image data .
private synchronized boolean put(URL url, String modified, Bitmap image) {
    if (!imageDb.isReady()) {
      return false;
    }
    Log.i(TAG, "Attempting to put " + url.toString());
    if (imageDb.exists(url)) {
      Log.i(TAG, "ALREADY EXISTS!");
      return false;
    }
    Log.i(TAG, "Putting photo into DB.");
    try {
      return imageDb.put(url, modified, image) != -1;
    } catch (SQLiteDiskIOException ex) {
      Log.w(TAG, "Unable to put photo in DB, disk full or unavailable.");
      return false;
    }
  }
private synchronized boolean put ( URL url , String modified , Bitmap image ) { if ( ! imageDb . isReady ( ) ) { return false ; } Log . i ( TAG , "Attempting to put " + url . toString ( ) ) ; if ( imageDb . exists ( url ) ) { Log . i ( TAG , "ALREADY EXISTS!" ) ; return false ; } Log . i ( TAG , "Putting photo into DB." ) ; try { return imageDb . put ( url , modified , image ) != - 1 ; } catch ( SQLiteDiskIOException ex ) { Log . w ( TAG , "Unable to put photo in DB, disk full or unavailable." ) ; return false ; } }
Stores the image with the given URL and the modified/version String.
Stores the image with the given URL and the modified / version String .