Package org.apache.sshd.sftp.server
Class FileHandle
java.lang.Object
org.apache.sshd.sftp.server.Handle
org.apache.sshd.sftp.server.FileHandle
- All Implemented Interfaces:
Closeable,AutoCloseable,Channel,AttributeRepository,AttributeStore
- Author:
- Apache MINA SSHD Project
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.sshd.common.AttributeRepository
AttributeRepository.AttributeKey<T> -
Constructor Summary
ConstructorsConstructorDescriptionFileHandle(SftpSubsystem subsystem, Path file, String handle, int flags, int access, Map<String, Object> attrs) -
Method Summary
Modifier and TypeMethodDescriptionvoidappend(byte[] data) voidappend(byte[] data, int doff, int length) voidclose()intfinal Collection<FileAttribute<?>> final Set<StandardOpenOption> static Set<StandardOpenOption> getOpenOptions(int flags, int access) booleanvoidlock(long offset, long length, int mask) intread(byte[] data, int doff, int length, long offset) intread(byte[] data, int doff, int length, long offset, AtomicReference<Boolean> eof) intread(byte[] data, long offset) static FileAttribute<?> toFileAttribute(String key, Object val) static Collection<FileAttribute<?>> toFileAttributes(Map<String, ?> attrs) voidunlock(long offset, long length) voidwrite(byte[] data, int doff, int length, long offset) voidwrite(byte[] data, long offset) Methods inherited from class org.apache.sshd.sftp.server.Handle
attributeKeys, clearAttributes, computeAttributeIfAbsent, getAttribute, getAttributesCount, getFile, getFileHandle, getSubsystem, isOpen, removeAttribute, safe, setAttribute, signalHandleOpen, signalHandleOpening, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.sshd.common.AttributeRepository
resolveAttribute
-
Constructor Details
-
FileHandle
public FileHandle(SftpSubsystem subsystem, Path file, String handle, int flags, int access, Map<String, Object> attrs) throws IOException- Throws:
IOException
-
-
Method Details
-
getOpenOptions
-
getFileAttributes
-
getFileChannel
-
getAccessMask
public int getAccessMask() -
isOpenAppend
public boolean isOpenAppend() -
read
- Throws:
IOException
-
read
- Throws:
IOException
-
read
public int read(byte[] data, int doff, int length, long offset, AtomicReference<Boolean> eof) throws IOException - Throws:
IOException
-
append
- Throws:
IOException
-
append
- Throws:
IOException
-
write
- Throws:
IOException
-
write
- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceChannel- Specified by:
closein interfaceCloseable- Overrides:
closein classHandle- Throws:
IOException
-
lock
- Throws:
IOException
-
unlock
- Throws:
IOException
-
toFileAttributes
-
toFileAttribute
-
getOpenOptions
-