}
public void writeData(GcsFilename filename, ByteBufferGenerator gen) throws IOException {
LevelDbOutputWriter writer = new GoogleCloudStorageLevelDbOutputWriter(
new GoogleCloudStorageFileOutputWriter(filename, "TestData"));
writer.beginShard();
writer.beginSlice();
while (gen.hasNext()) {
writer.write(gen.next());
}
writer.endSlice();