Exemplo n.º 1
0
 public AppEngineFile getBlobFile(BlobKey blobKey) throws FileNotFoundException {
   if (blobKey == null) {
     throw new NullPointerException("blobKey is null");
   }
   Entity entity = getEntity(blobKey);
   String creationHandle = (String) entity.getProperty(BLOB_INFO_CREATION_HANDLE_PROPERTY);
   String namePart = (creationHandle == null ? blobKey.getKeyString() : creationHandle);
   AppEngineFile file = new AppEngineFile(AppEngineFile.FileSystem.BLOBSTORE, namePart);
   setCachedBlobKey(file, blobKey);
   return file;
 }
Exemplo n.º 2
0
 private String getBlobKey(Entity blobFileIndexEntity) {
   return (String) blobFileIndexEntity.getProperty(BLOB_KEY_PROPERTY_NAME);
 }