AppEngineFile file = fileService.createNewBlobFile("text/plain", "uploadedText.txt");
FileWriteChannel channel = fileService.openWriteChannel(file, true);
try {
channel.write(ByteBuffer.wrap(text.getBytes()));
} finally {
channel.closeFinally();
}
return fileService.getBlobKey(file);
}
}