Modifier and Type | Field and Description |
---|---|
private java.io.File |
file |
private ImmutableSet<FileWriteMode> |
modes |
Modifier | Constructor and Description |
---|---|
private |
FileByteSink(java.io.File file,
FileWriteMode... modes) |
Modifier and Type | Method and Description |
---|---|
java.io.FileOutputStream |
openStream()
Opens a new
OutputStream for writing to this sink. |
java.lang.String |
toString() |
asCharSink, openBufferedStream, write, writeFrom
private final java.io.File file
private final ImmutableSet<FileWriteMode> modes
private FileByteSink(java.io.File file, FileWriteMode... modes)
public java.io.FileOutputStream openStream() throws java.io.IOException
ByteSink
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.
openStream
in class ByteSink
java.io.IOException
- if an I/O error occurs while opening the streampublic java.lang.String toString()
toString
in class java.lang.Object