@InterfaceAudience.Public @InterfaceStability.Stable public class FSDataOutputStream extends DataOutputStream implements Syncable
OutputStream in a DataOutputStream,
buffers output through a BufferedOutputStream and creates a checksum
file.writtenout| Constructor and Description |
|---|
FSDataOutputStream(OutputStream out)
Deprecated.
|
FSDataOutputStream(OutputStream out,
FileSystem.Statistics stats) |
FSDataOutputStream(OutputStream out,
FileSystem.Statistics stats,
long startPosition) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the underlying output stream.
|
long |
getPos()
Get the current position in the output stream.
|
void |
hflush()
Flush out the data in client's user buffer.
|
void |
hsync()
Similar to posix fsync, flush out the data in client's user buffer
all the way to the disk device (but the disk may have it in its cache).
|
void |
sync()
Deprecated.
|
flush, size, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTFwriteclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwrite@Deprecated public FSDataOutputStream(OutputStream out) throws IOException
IOExceptionpublic FSDataOutputStream(OutputStream out, FileSystem.Statistics stats) throws IOException
IOExceptionpublic FSDataOutputStream(OutputStream out, FileSystem.Statistics stats, long startPosition) throws IOException
IOExceptionpublic long getPos() throws IOException
IOExceptionpublic void close() throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class FilterOutputStreamIOException@Deprecated public void sync() throws IOException
sync in interface SyncableIOExceptionSyncable.hflush()public void hflush() throws IOException
Syncablehflush in interface SyncableIOException - if any error occurspublic void hsync() throws IOException
Syncablehsync in interface SyncableIOException - if error occursCopyright © 2014 Apache Software Foundation. All Rights Reserved.