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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en.