body.write(b, 0, read);
in.close();
}
MimePart mime = new MimePart(filename, body.toByteArray(), contentType);
if (lastmod > 0) {
mime.setLastModified(new Date(lastmod));
}
mime.setETag(etag);
return Context.toObject(mime, this);
} catch (Exception x) {
app.logError("Error getting URL "+location, x);
}