Here is the workaround part, this is for base64 blobinfo size designation 
problem:

private void workaround(ByteArrayOutputStream out, BlobKey blobKey, long 
offset, long filesize) {
    int chunkSize = 1;
    long limit = 0;
    while (offset < filesize) {

      limit = offset + chunkSize - 1;
      if (filesize < limit) {
        limit = filesize;
      }

      //System.out.println("workaround: offset=" + offset + " limit=" + limit + 
" size=" + filesize);

      byte[] b = null;
      try {
        b = blobstoreService.fetchData(blobKey, offset, limit);
      } catch (Exception e) {
        //e.printStackTrace();
        return;
      }
      try {
        out.write(b);
      } catch (IOException e) {
        e.printStackTrace();
        return;
      }

      offset += chunkSize;
      if (offset > filesize) {
        offset = filesize;
      }
    }
  }

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to