public interface FuseFileStream extends AutoCloseable
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the stream and releases the lock.
|
void |
closeStream()
Closes the stream without releasing the locking resource.
|
void |
flush()
Flushes the stream.
|
FileStatus |
getFileStatus() |
boolean |
isClosed() |
boolean |
isReadOnly() |
int |
read(ByteBuffer buf,
long size,
long offset)
Reads data from the stream.
|
void |
releaseLock()
Releases the lock resource the stream obtained.
|
void |
truncate(long size)
Truncates the file to the given size.
|
void |
write(ByteBuffer buf,
long size,
long offset)
Writes data to the stream.
|
int read(ByteBuffer buf, long size, long offset)
buf
- the byte buffer to read data tosize
- the size to readoffset
- the offset of the target stream to begin readingvoid write(ByteBuffer buf, long size, long offset)
buf
- the byte buffer to read data from and write to the streamsize
- the size to writeoffset
- the offset to writeFileStatus getFileStatus()
void flush()
void truncate(long size)
size
- the truncate sizevoid close()
close
in interface AutoCloseable
boolean isClosed()
boolean isReadOnly()
void releaseLock()
void closeStream()
Copyright © 2023. All Rights Reserved.