public class SftpOutputStreamWithChannel extends OutputStreamWithChannel
Modifier and Type | Field and Description |
---|---|
private byte[] |
bb |
private byte[] |
buffer |
private SftpClient |
client |
private SftpClient.CloseableHandle |
handle |
private int |
index |
private long |
offset |
private java.lang.String |
path |
Constructor and Description |
---|
SftpOutputStreamWithChannel(SftpClient client,
int bufferSize,
java.lang.String path,
java.util.Collection<SftpClient.OpenMode> mode) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flush() |
SftpClient |
getClient()
The client instance
|
java.lang.String |
getPath()
The remotely accessed file path
|
boolean |
isOpen() |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
private final SftpClient client
private final java.lang.String path
private final byte[] bb
private final byte[] buffer
private int index
private SftpClient.CloseableHandle handle
private long offset
public SftpOutputStreamWithChannel(SftpClient client, int bufferSize, java.lang.String path, java.util.Collection<SftpClient.OpenMode> mode) throws java.io.IOException
java.io.IOException
public final SftpClient getClient()
SftpClient
instance used to access the remote filepublic final java.lang.String getPath()
public boolean isOpen()
public void write(int b) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public void write(byte[] b, int off, int len) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.OutputStream
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in interface java.nio.channels.Channel
close
in class java.io.OutputStream
java.io.IOException