com.google.appengine.api.blobstore
Class BlobInfo
- java.lang.Object
-
- com.google.appengine.api.blobstore.BlobInfo
-
- All Implemented Interfaces:
- java.io.Serializable
public class BlobInfo extends java.lang.Object implements java.io.SerializableBlobInfocontains 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., Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description BlobInfo(BlobKey blobKey, java.lang.String contentType, java.util.Date creation, java.lang.String filename, long size)BlobInfo(BlobKey blobKey, java.lang.String contentType, java.util.Date creation, java.lang.String filename, long size, java.lang.String md5Hash)BlobInfo(BlobKey blobKey, java.lang.String contentType, java.util.Date creation, java.lang.String filename, long size, java.lang.String md5Hash, java.lang.String gsObjectName)Creates aBlobInfoby providing theBlobKeyand all associated metadata.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleanequals(java.lang.Object obj)BlobKeygetBlobKey()Returns theBlobKeyof the Blob thisBlobInfodescribes.java.lang.StringgetContentType()Returns the MIME Content-Type provided in the HTTP header during upload of this Blob.java.util.DategetCreation()Returns the time and date the blob was upload.java.lang.StringgetFilename()Returns the file included in the Content-Disposition HTTP header during upload of this Blob.java.lang.StringgetGsObjectName()Returns the object name of this Blob, if it is stored in Google Cloud Storage, in the form/[bucket-name]/[object-name].java.lang.StringgetMd5Hash()Returns the md5Hash of this Blob.longgetSize()Returns the size in bytes of this Blob.inthashCode()java.lang.StringtoString()
-
-
-
Constructor Detail
-
BlobInfo
public BlobInfo(BlobKey blobKey, java.lang.String contentType, java.util.Date creation, java.lang.String filename, long size, java.lang.String md5Hash, java.lang.String gsObjectName)
Creates aBlobInfoby providing theBlobKeyand all associated metadata. This is typically done by the API on the developer's behalf.- Parameters:
blobKey- theBlobKeyof the Blob.contentType- the MIME Content-Type provided in the HTTP header during upload of this Blob.creation- the time and date the blob was uploaded.filename- the file included in the Content-Disposition HTTP header during upload of this Blob.size- the size in bytes of this Blob.md5Hash- the md5Hash of this Blob.gsObjectName- the object name of this Blob, if it is stored on Google Cloud Storage, null otherwise.
-
BlobInfo
public BlobInfo(BlobKey blobKey, java.lang.String contentType, java.util.Date creation, java.lang.String filename, long size, java.lang.String md5Hash)
-
BlobInfo
public BlobInfo(BlobKey blobKey, java.lang.String contentType, java.util.Date creation, java.lang.String filename, long size)
-
-
Method Detail
-
getContentType
public java.lang.String getContentType()
Returns the MIME Content-Type provided in the HTTP header during upload of this Blob.
-
getCreation
public java.util.Date getCreation()
Returns the time and date the blob was upload.
-
getFilename
public java.lang.String getFilename()
Returns the file included in the Content-Disposition HTTP header during upload of this Blob.
-
getSize
public long getSize()
Returns the size in bytes of this Blob.
-
getMd5Hash
public java.lang.String getMd5Hash()
Returns the md5Hash of this Blob.
-
getGsObjectName
public java.lang.String getGsObjectName()
Returns the object name of this Blob, if it is stored in Google Cloud Storage, in the form/[bucket-name]/[object-name]. Returnsnullif the Blob is stored in Blobstorage.
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-