FileWriteChannel writeChannel = fileService.openWriteChannel(file, true);
// This time we write to the channel directly
writeChannel.write(ByteBuffer.wrap(data));
// Now finalize
writeChannel.closeFinally();
//if(blobKey !=null) //delete the existing blob first -- GOT ERROR here....
// blobstoreService.delete(blobKey);
// Now read from the file using the Blobstore API
blobKey = fileService.getBlobKey(file);
String[] json = {blobKey.getKeyString()};