public class FileHandle extends Handle
| Constructor and Description |
|---|
FileHandle(SftpSubsystem sftpSubsystem,
Path file,
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() |
FileChannel |
getFileChannel() |
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) |
boolean |
unlock(long offset,
long length) |
void |
write(byte[] data,
int doff,
int length,
long offset) |
void |
write(byte[] data,
long offset) |
public FileHandle(SftpSubsystem sftpSubsystem, Path file, int flags, int access, Map<String,Object> attrs) throws IOException
IOExceptionpublic final FileChannel 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 class HandleIOExceptionpublic void lock(long offset,
long length,
int mask)
throws IOException
IOExceptionpublic boolean unlock(long offset,
long length)
throws IOException
IOExceptionCopyright © 2008–2015 The Apache Software Foundation. All rights reserved.