}
protected BlobKey writeNewBlobFile(String text) throws IOException {
FileService fileService = FileServiceFactory.getFileService();
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);
}