Java tutorial
//package com.java2s; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; public class Main { private static void writeToFile(File file, String uuid) throws IOException { file.createNewFile(); FileOutputStream out = new FileOutputStream(file); out.write(uuid.getBytes()); out.close(); } }