Package com.sshtools.client.sftp
Class SftpFileInputStream
java.lang.Object
java.io.InputStream
com.sshtools.client.sftp.SftpFileInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
An InputStream to read the contents of a remote file.
-
Constructor Summary
ConstructorsConstructorDescriptionSftpFileInputStream
(SftpFile file) Deprecated, for removal: This API element is subject to removal in a future version.SftpFileInputStream
(SftpFile file, long position) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Methods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Constructor Details
-
SftpFileInputStream
@Deprecated(since="3.1.0", forRemoval=true) public SftpFileInputStream(SftpFile file) throws com.sshtools.common.sftp.SftpStatusException, com.sshtools.common.ssh.SshException Deprecated, for removal: This API element is subject to removal in a future version.Creates a new SftpFileInputStream object.- Parameters:
file
- file- Throws:
com.sshtools.common.sftp.SftpStatusException
com.sshtools.common.ssh.SshException
- See Also:
-
SftpFileInputStream
@Deprecated(since="3.1.0", forRemoval=true) public SftpFileInputStream(SftpFile file, long position) throws com.sshtools.common.sftp.SftpStatusException, com.sshtools.common.ssh.SshException Deprecated, for removal: This API element is subject to removal in a future version.Creates a new SftpFileInputStream object.- Parameters:
file
- fileposition
- at which to start reading- Throws:
com.sshtools.common.sftp.SftpStatusException
com.sshtools.common.ssh.SshException
- See Also:
-
-
Method Details
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
available
public int available()- Overrides:
available
in classInputStream
-
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-
close
Closes the SFTP file handle.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
-