本文整理了Java中com.google.cloud.storage.Blob.deleteAcl()
方法的一些代码示例,展示了Blob.deleteAcl()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Blob.deleteAcl()
方法的具体详情如下:
包路径:com.google.cloud.storage.Blob
类名称:Blob
方法名:deleteAcl
[英]Deletes the ACL entry for the specified entity on this blob.
Example of deleting the ACL entry for an entity.
boolean deleted = blob.deleteAcl(User.ofAllAuthenticatedUsers());else
// the acl entry was not found
}
}
[中]删除此blob上指定实体的ACL项。
删除实体的ACL条目的示例。
boolean deleted = blob.deleteAcl(User.ofAllAuthenticatedUsers());else
// the acl entry was not found
}
}
代码示例来源:origin: googleapis/google-cloud-java
/** Example of deleting the ACL entry for an entity. */
// [TARGET deleteAcl(Entity)]
public boolean deleteAcl() {
// [START deleteAcl]
boolean deleted = blob.deleteAcl(User.ofAllAuthenticatedUsers());
if (deleted) {
// the acl entry was deleted
} else {
// the acl entry was not found
}
// [END deleteAcl]
return deleted;
}
代码示例来源:origin: googleapis/google-cloud-java
@Test
public void testDeleteAcl() throws Exception {
initializeExpectedBlob(1);
expect(storage.getOptions()).andReturn(mockOptions);
expect(storage.deleteAcl(BLOB_INFO.getBlobId(), User.ofAllAuthenticatedUsers()))
.andReturn(true);
replay(storage);
initializeBlob();
assertTrue(blob.deleteAcl(User.ofAllAuthenticatedUsers()));
}
内容来源于网络,如有侵权,请联系作者删除!