BlobstoreService (Google App Engine API for Java)

com.google.appengine.api.blobstore

Interface BlobstoreService



  • public interface BlobstoreService
    BlobstoreService allows you to manage the creation and serving of large, immutable blobs to users.
    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method and Description
      BlobKey createGsBlobKey(java.lang.String filename)
      Create a BlobKey for a Google Storage File.
      java.lang.String createUploadUrl(java.lang.String successPath)
      Create an absolute URL that can be used by a user to asynchronously upload a large blob.
      java.lang.String createUploadUrl(java.lang.String successPath, UploadOptions uploadOptions)
      Create an absolute URL that can be used by a user to asynchronously upload a large blob.
      void delete(BlobKey... blobKeys)
      Permanently deletes the specified blobs.
      byte[] fetchData(BlobKey blobKey, long startIndex, long endIndex)
      Get fragment from specified blob.
      java.util.Map<java.lang.String,java.util.List<BlobInfo>> getBlobInfos(HttpServletRequest request)
      Returns the BlobInfo for any files that were uploaded, keyed by the upload form "name" field.
      ByteRange getByteRange(HttpServletRequest request)
      Get byte range from the request.
      java.util.Map<java.lang.String,java.util.List<FileInfo>> getFileInfos(HttpServletRequest request)
      Returns the FileInfo for any files that were uploaded, keyed by the upload form "name" field.
      java.util.Map<java.lang.String,BlobKey> getUploadedBlobs(HttpServletRequest request)
      Deprecated. 
      Use getUploads(HttpServletRequest) instead. Note that getUploadedBlobs does not handle cases where blobs have been uploaded using the multiple="true" attribute of the file input form element.
      java.util.Map<java.lang.String,java.util.List<BlobKey>> getUploads(HttpServletRequest request)
      Returns the BlobKey for any files that were uploaded, keyed by the upload form "name" field.
      void serve(BlobKey blobKey, ByteRange byteRange, HttpServletResponse response)
      Arrange for the specified blob to be served as the response content for the current request.
      void serve(BlobKey blobKey, HttpServletResponse response)
      Arrange for the specified blob to be served as the response content for the current request.
      void serve(BlobKey blobKey, java.lang.String rangeHeader, HttpServletResponse response)
      Arrange for the specified blob to be served as the response content for the current request.
    • Method Detail

      • createUploadUrl

        java.lang.String createUploadUrl(java.lang.String successPath)
        Create an absolute URL that can be used by a user to asynchronously upload a large blob. Upon completion of the upload, a callback is made to the specified URL.
        Parameters:
        successPath - A relative URL which will be invoked after the user successfully uploads a blob. Must start with a "/".
        Throws:
        java.lang.IllegalArgumentException - If successPath was not valid.
        BlobstoreFailureException - If an error occurred while communicating with the blobstore.
      • createUploadUrl

        java.lang.String createUploadUrl(java.lang.String successPath,
                                         UploadOptions uploadOptions)
        Create an absolute URL that can be used by a user to asynchronously upload a large blob. Upon completion of the upload, a callback is made to the specified URL.
        Parameters:
        successPath - A relative URL which will be invoked after the user successfully uploads a blob. Must start with a "/".
        uploadOptions - Specific options applicable only for this upload URL.
        Throws:
        java.lang.IllegalArgumentException - If successPath was not valid.
        BlobstoreFailureException - If an error occurred while communicating with the blobstore.
      • serve

        void serve(