Class SftpOutputStreamWithChannel
- java.lang.Object
-
- java.io.OutputStream
-
- org.apache.sshd.common.util.io.OutputStreamWithChannel
-
- org.apache.sshd.client.subsystem.sftp.SftpOutputStreamWithChannel
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
,Channel
public class SftpOutputStreamWithChannel extends OutputStreamWithChannel
Implements an output stream for a given remote file- Author:
- Apache MINA SSHD Project
-
-
Constructor Summary
Constructors Constructor Description SftpOutputStreamWithChannel(SftpClient client, int bufferSize, String path, Collection<SftpClient.OpenMode> mode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
flush()
SftpClient
getClient()
The client instanceString
getPath()
The remotely accessed file pathboolean
isOpen()
void
write(byte[] b, int off, int len)
void
write(int b)
-
Methods inherited from class java.io.OutputStream
nullOutputStream, write
-
-
-
-
Constructor Detail
-
SftpOutputStreamWithChannel
public SftpOutputStreamWithChannel(SftpClient client, int bufferSize, String path, Collection<SftpClient.OpenMode> mode) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getClient
public final SftpClient getClient()
The client instance- Returns:
SftpClient
instance used to access the remote file
-
getPath
public final String getPath()
The remotely accessed file path- Returns:
- Remote file path
-
isOpen
public boolean isOpen()
-
write
public void write(int b) throws IOException
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
write
public void write(byte[] b, int off, int len) throws IOException
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
flush
public void flush() throws IOException
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceChannel
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-
-