NIO
Channel public static void write(String path) throws Exception {
RandomAccessFile aFile = new RandomAccessFile(path, "rw");
FileChannel channel = aFile.getChannel();
ByteBuffer buf = ByteBuffer.allocate(100);
...