public class FileHandle extends Handle
| Constructor and Description |
|---|
FileHandle(SftpSubsystem subsystem,
Path file,
String handle,
int flags,
int access,
Map<String,Object> attrs) |
| Modifier and Type | Method and Description |
|---|---|
void |
append(byte[] data) |
void |
append(byte[] data,
int doff,
int length) |
void |
close() |
int |
getAccessMask() |
Collection<FileAttribute<?>> |
getFileAttributes() |
SeekableByteChannel |
getFileChannel() |
Set<StandardOpenOption> |
getOpenOptions() |
static Set<StandardOpenOption> |
getOpenOptions(int flags,
int access) |
boolean |
isOpenAppend() |
void |
lock(long offset,
long length,
int mask) |
int |
read(byte[] data,
int doff,
int length,
long offset) |
int |
read(byte[] data,
long offset) |
static FileAttribute<?> |
toFileAttribute(String key,
Object val) |
static Collection<FileAttribute<?>> |
toFileAttributes(Map<String,Object> attrs) |
void |
unlock(long offset,
long length) |
void |
write(byte[] data,
int doff,
int length,
long offset) |
void |
write(byte[] data,
long offset) |
getFile, getFileHandle, isOpen, signalHandleOpen, signalHandleOpening, toStringpublic FileHandle(SftpSubsystem subsystem, Path file, String handle, int flags, int access, Map<String,Object> attrs) throws IOException
IOExceptionpublic final Set<StandardOpenOption> getOpenOptions()
public final Collection<FileAttribute<?>> getFileAttributes()
public final SeekableByteChannel getFileChannel()
public int getAccessMask()
public boolean isOpenAppend()
public int read(byte[] data,
long offset)
throws IOException
IOExceptionpublic int read(byte[] data,
int doff,
int length,
long offset)
throws IOException
IOExceptionpublic void append(byte[] data)
throws IOException
IOExceptionpublic void append(byte[] data,
int doff,
int length)
throws IOException
IOExceptionpublic void write(byte[] data,
long offset)
throws IOException
IOExceptionpublic void write(byte[] data,
int doff,
int length,
long offset)
throws IOException
IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface Channelclose in class HandleIOExceptionpublic void lock(long offset,
long length,
int mask)
throws IOException
IOExceptionpublic void unlock(long offset,
long length)
throws IOException
IOExceptionpublic static Collection<FileAttribute<?>> toFileAttributes(Map<String,Object> attrs)
public static FileAttribute<?> toFileAttribute(String key, Object val)
public static Set<StandardOpenOption> getOpenOptions(int flags, int access)
Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.