@@ -0,0 +1,675 @@
+package com.hzh.corejava.nio;%0A%0Aimport java.io.IOException;%0Aimport java.nio.ByteBuffer;%0Aimport java.nio.channels.FileChannel;%0Aimport java.nio.file.Paths;%0Aimport java.nio.file.StandardOpenOption;%0A%0A/**%0A * Created by lenovo on 2017/3/13.%0A */%0Apublic class FileChannelWriteExample %7B%0A    public static void main(String%5B%5D args) throws IOException %7B%0A        FileChannel fileChannel = FileChannel.open(Paths.get(%22greeting.txt%22), StandardOpenOption.CREATE, StandardOpenOption.WRITE, StandardOpenOption.APPEND);%0A        String text = %22What is up?Guys%22;%0A        ByteBuffer buffer = ByteBuffer.wrap(text.getBytes());%0A        fileChannel.write(buffer);%0A        fileChannel.close();%0A    %7D%0A%7D%0A

Add FileChannel write example