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
IOException
public final FileChannel getFileChannel()
public int getAccessMask()
public boolean isOpenAppend()
public int read(byte[] data, long offset) throws IOException
IOException
public int read(byte[] data, int doff, int length, long offset) throws IOException
IOException
public void append(byte[] data) throws IOException
IOException
public void append(byte[] data, int doff, int length) throws IOException
IOException
public void write(byte[] data, long offset) throws IOException
IOException
public void write(byte[] data, int doff, int length, long offset) throws IOException
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in interface Channel
close
in class Handle
IOException
public void lock(long offset, long length, int mask) throws IOException
IOException
public boolean unlock(long offset, long length) throws IOException
IOException
Copyright © 2008–2016 The Apache Software Foundation. All rights reserved.