I write to my bucket using the following code:String result = "Done writing file.";try {// Get the file serviceFileService fileService = FileServiceFactory.getFileService();GSFileOptionsBuilder optionsBuilder = new GSFileOptionsBuilder().setBucket("maple").setKey("hello.txt").setAcl("public-read");// Create your objectAppEngineFile writableFile = fileService.createNewGSFile(optionsBuilder.build());// Open a channel for writingboolean lockForWrite = false; // Do you want to exclusively lock this object?FileWriteChannel writeChannel = fileService.openWriteChannel(writableFile, lockForWrite);// For this example, we write to the object using the PrintWriterPrintWriter out = new PrintWriter(Channels.newWriter(writeChannel, "UTF8"));out.println("The woods are lovely and deep.");out.println("But I have promises too keep.");// Close the object without finalizing.out.close();// Save the file pathString path = writableFile.getFullPath();// Lock the file so no one else can access it at the same timelockForWrite = true;// Write to the unfinalized file again in a separate requestwritableFile = new AppEngineFile(path);writeChannel = fileService.openWriteChannel(writableFile, lockForWrite);writeChannel.write(ByteBuffer.wrap("And miles to go before I sleep.".getBytes()));// Finalize the objectwriteChannel.closeFinally();}catch (IOException e) {result = "Failed to read file";e.printStackTrace();}return result;I am also able to read the file using java code. However, when I access the Google Cloud Storage using my browser, I don't see the newly written file in my bucket. why is this?Also, when i try the link to the file (http://storage.googleapis.com/maple/hello.txt) i get the following:<Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message></Error>Please advise.--
You received this message because you are subscribed to the Google Groups "Google Cloud Storage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gs-discussio...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.