Here you can find the source of newOutputStream(FileSystem system, Path path)
public static OutputStream newOutputStream(FileSystem system, Path path) throws IOException
//package com.java2s; //License from project: Apache License import java.io.IOException; import java.io.OutputStream; import java.nio.file.FileSystem; import java.nio.file.Path; import java.nio.file.spi.FileSystemProvider; public class Main { public static OutputStream newOutputStream(FileSystem system, Path path) throws IOException { FileSystemProvider provider = system.provider(); return provider.newOutputStream(path); }/*from w ww. j ava2 s .c om*/ }