Пример #1
0
 @Override
 public void writeContentsToPath(String contents, Path path, FileAttribute<?>... attrs)
     throws IOException {
   writeBytesToPath(contents.getBytes(Charsets.UTF_8), path, attrs);
 }
Пример #2
0
 @Override
 public void copyToPath(final InputStream inputStream, Path path, CopyOption... options)
     throws IOException {
   writeBytesToPath(ByteStreams.toByteArray(inputStream), path);
 }
Пример #3
0
 @Override
 public Path createNewFile(Path path) throws IOException {
   writeBytesToPath(new byte[0], path);
   return path;
 }