public class NfsFileOutputStream
extends java.io.OutputStream
java.io.FileOutputStream.| Constructor and Description |
|---|
NfsFileOutputStream(NfsFile<?,?> nfsFile)
Creates a file output stream to write to the file represented by the
specified
NfsFile object, starting at
offset = 0 and using syncType = FILE_SYNC
(commit all data and metadata to stable storage before returning). |
NfsFileOutputStream(NfsFile<?,?> nfsFile,
int syncType)
Creates a file output stream to write to the file represented by the
specified
NfsFile object, starting at
offset = 0 and using syncType behavior. |
NfsFileOutputStream(NfsFile<?,?> nfsFile,
long offset,
int syncType)
Creates a file output stream to write to the file represented by the
specified
NfsFile object, starting at offset
and using syncType behavior. |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush() |
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
public NfsFileOutputStream(NfsFile<?,?> nfsFile) throws java.io.IOException
NfsFile object, starting at
offset = 0 and using syncType = FILE_SYNC
(commit all data and metadata to stable storage before returning).
If the file does not exist, it will first be created.
nfsFile - The file to be opened for writing.java.io.IOException - If the file exists but is a directory rather than a regular
file, does not exist but cannot be created, or cannot be
opened for any other reasonpublic NfsFileOutputStream(NfsFile<?,?> nfsFile, int syncType) throws java.io.IOException
NfsFile object, starting at
offset = 0 and using syncType behavior.
If the file does not exist, it will first be created.
nfsFile - The file to be opened for writing.syncType - One of the values below.
java.io.IOException - If the file exists but is a directory rather than a regular
file, does not exist but cannot be created, or cannot be
opened for any other reasonpublic NfsFileOutputStream(NfsFile<?,?> nfsFile, long offset, int syncType) throws java.io.IOException
NfsFile object, starting at offset
and using syncType behavior.
If the file does not exist, it will first be created.
nfsFile - The file to be opened for writing.offset - Where to start writing to the file.syncType - One of the values below.
java.io.IOException - If the file exists but is a directory rather than a regular
file, does not exist but cannot be created, or cannot be
opened for any other reasonpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.OutputStreamjava.io.IOExceptionpublic void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOExceptionpublic void write(int b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void write(byte[] b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void write(byte[] b,
int off,
int len)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOException