@ThreadSafe public class FuseFileOutStream extends java.lang.Object implements FuseFileStream
FuseFileStream for sequential write only operations
against an Alluxio uri.FuseFileStream.Factory| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the stream.
|
static FuseFileOutStream |
create(FileSystem fileSystem,
AuthPolicy authPolicy,
AlluxioURI uri,
int flags,
long mode,
java.util.Optional<URIStatus> status)
Creates a
FuseFileInOrOutStream. |
void |
flush()
Flushes the stream.
|
long |
getFileLength()
Gets the file length.
|
int |
read(java.nio.ByteBuffer buf,
long size,
long offset)
Reads data from the stream.
|
void |
truncate(long size)
Truncates the file to the given size.
|
void |
write(java.nio.ByteBuffer buf,
long size,
long offset)
Writes data to the stream.
|
public static FuseFileOutStream create(FileSystem fileSystem, AuthPolicy authPolicy, AlluxioURI uri, int flags, long mode, java.util.Optional<URIStatus> status)
FuseFileInOrOutStream.fileSystem - the Alluxio file systemauthPolicy - the Authentication policyuri - the alluxio uriflags - the fuse create/open flagsmode - the filesystem mode, -1 if not setstatus - the uri statusFuseFileInOrOutStreampublic int read(java.nio.ByteBuffer buf,
long size,
long offset)
FuseFileStreamread in interface FuseFileStreambuf - the byte buffer to read data tosize - the size to readoffset - the offset of the target stream to begin readingpublic void write(java.nio.ByteBuffer buf,
long size,
long offset)
FuseFileStreamwrite in interface FuseFileStreambuf - the byte buffer to read data from and write to the streamsize - the size to writeoffset - the offset to writepublic long getFileLength()
FuseFileStreamgetFileLength in interface FuseFileStreampublic void flush()
FuseFileStreamflush in interface FuseFileStreampublic void truncate(long size)
FuseFileStreamtruncate in interface FuseFileStreamsize - the truncate sizepublic void close()
FuseFileStreamclose in interface FuseFileStreamclose in interface java.lang.AutoCloseableCopyright © 2023. All Rights Reserved.