Package com.google.appengine.api.blobstore.BlobstoreServicePb

Examples of com.google.appengine.api.blobstore.BlobstoreServicePb.FetchDataRequest


    if (fetchSize > MAX_BLOB_FETCH_SIZE) {
      throw new IllegalArgumentException("Blob fetch size " + fetchSize + " is larger " +
                                         "than maximum size " + MAX_BLOB_FETCH_SIZE + " bytes.");
    }

    FetchDataRequest request = new FetchDataRequest();
    request.setBlobKey(blobKey.getKeyString());
    request.setStartIndex(startIndex);
    request.setEndIndex(endIndex);

    byte[] responseBytes;
    try {
      responseBytes = ApiProxy.makeSyncCall(PACKAGE, "FetchData", request.toByteArray());
    } catch (ApiProxy.ApplicationException ex) {
      switch (BlobstoreServiceError.ErrorCode.valueOf(ex.getApplicationError())) {
        case PERMISSION_DENIED:
          throw new SecurityException("This application does not have access to that blob.");
        case BLOB_NOT_FOUND:
View Full Code Here

TOP

Related Classes of com.google.appengine.api.blobstore.BlobstoreServicePb.FetchDataRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.