Using Writable Channel to replace write to OutputStream one by one.