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.IOExceptionpublic 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.OutputStreamjava.io.IOExceptionpublic void write(byte[] b,
int off,
int len)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in interface java.nio.channels.Channelclose in class java.io.OutputStreamjava.io.IOException