Send feedback
Class BlobInfo (2.0.0)
Stay organized with collections
Save and categorize content based on your preferences.
public class BlobInfo implements Serializable
BlobInfo
contains metadata about a blob. This metadata is gathered by
parsing the HTTP headers included in the blob upload.
See Also: RFC 1867 for the specification of HTTP file uploads.
Constructors
BlobInfo(BlobKey blobKey, String contentType, Date creation, String filename, long size)
public BlobInfo ( BlobKey blobKey , String contentType , Date creation , String filename , long size )
BlobInfo(BlobKey blobKey, String contentType, Date creation, String filename, long size, String md5Hash)
public BlobInfo ( BlobKey blobKey , String contentType , Date creation , String filename , long size , String md5Hash )
BlobInfo(BlobKey blobKey, String contentType, Date creation, String filename, long size, String md5Hash, @Nullable String gsObjectName)
public BlobInfo ( BlobKey blobKey , String contentType , Date creation , String filename , long size , String md5Hash , @Nullable String gsObjectName )
Creates a BlobInfo
by providing the BlobKey and all
associated metadata. This is typically done by the API on the developer's
behalf.
Parameters
Name
Description
blobKey
BlobKey
the BlobKey of the Blob.
contentType
String
the MIME Content-Type provided in the HTTP header during upload of this
Blob.
creation
Date
the time and date the blob was uploaded.
filename
String
the file included in the Content-Disposition HTTP header during upload of
this Blob.
size
long
the size in bytes of this Blob.
md5Hash
String
the md5Hash of this Blob.
gsObjectName
@org.checkerframework.checker.nullness.qual.Nullable java.lang.String
the object name of this Blob, if it is stored on Google Cloud Storage,
null otherwise.
Fields
blobKey
protected final BlobKey blobKey
Field Value
Type
Description
BlobKey
contentType
protected final String contentType
Field Value
Type
Description
String
creation
protected final Date creation
Field Value
Type
Description
Date
filename
protected final String filename
Field Value
Type
Description
String
gsObjectName
protected final @Nullable String gsObjectName
Field Value
Type
Description
@org.checkerframework.checker.nullness.qual.Nullable java.lang.String
md5Hash
Field Value
Type
Description
String
size
protected final long size
Field Value
Type
Description
long
Methods
equals(@Nullable Object obj)
public boolean equals ( @Nullable Object obj )
Parameter
Name
Description
obj
@org.checkerframework.checker.nullness.qual.Nullable java.lang.Object
Overrides
getBlobKey()
public BlobKey getBlobKey ()
Returns the BlobKey of the Blob this BlobInfo
describes.
getContentType()
public String getContentType ()
Returns the MIME Content-Type provided in the HTTP header during upload of
this Blob.
Returns
Type
Description
String
getCreation()
public Date getCreation ()
Returns the time and date the blob was upload.
Returns
Type
Description
Date
getFilename()
public String getFilename ()
Returns the file included in the Content-Disposition HTTP header during
upload of this Blob.
Returns
Type
Description
String
getGsObjectName()
public @Nullable String getGsObjectName ()
Returns the object name of this Blob, if it is stored in Google Cloud Storage,
in the form /[bucket-name]/[object-name]
. Returns null
if the Blob is stored
in Blobstorage.
Returns
Type
Description
@org.checkerframework.checker.nullness.qual.Nullable java.lang.String
getMd5Hash()
public String getMd5Hash ()
Returns the md5Hash of this Blob.
Returns
Type
Description
String
getSize()
Returns the size in bytes of this Blob.
Returns
Type
Description
long
hashCode()
Returns
Type
Description
int
Overrides
toString()
Returns
Type
Description
String
Overrides
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-11-26 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-11-26 UTC."],[],[]]