Class MoreFiles.PathByteSink

java.lang.Object
com.google.common.io.ByteSink
com.google.common.io.MoreFiles.PathByteSink
Enclosing class:
MoreFiles

private static final class MoreFiles.PathByteSink extends ByteSink
  • Field Details

    • path

      private final Path path
    • options

      private final OpenOption[] options
  • Constructor Details

    • PathByteSink

      private PathByteSink(Path path, OpenOption... options)
  • Method Details

    • openStream

      public OutputStream openStream() throws IOException
      Description copied from class: ByteSink
      Opens a new OutputStream for writing to this sink. This method returns a new, independent stream each time it is called.

      The caller is responsible for ensuring that the returned stream is closed.

      Specified by:
      openStream in class ByteSink
      Throws:
      IOException - if an I/O error occurs while opening the stream
    • toString

      public String toString()
      Overrides:
      toString in class Object