public abstract class FtpInputStream
extends org.mule.extension.file.common.api.stream.AbstractFileInputStream
AbstractFileInputStream implementation which obtains a FtpFileSystem through a ConnectionManager and
uses it to obtain the contents of a file on a FTP server.
When the stream is closed or fully consumed, the FtpFileSystem is released back to the ConnectionManager
in| Modifier | Constructor and Description |
|---|---|
protected |
FtpInputStream(Supplier<InputStream> streamSupplier,
org.mule.runtime.api.util.LazyValue<org.mule.runtime.api.connection.ConnectionHandler<FtpFileSystem>> connectionHandler,
org.mule.extension.file.common.api.lock.PathLock lock) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
beforeClose()
Template method for performing operations just before the stream is closed.
|
protected void |
doClose() |
protected static org.mule.runtime.api.connection.ConnectionHandler<FtpFileSystem> |
getConnectionHandler(FtpConnector config) |
protected FtpFileSystem |
getFtpFileSystem() |
protected static Supplier<InputStream> |
getStreamSupplier(FtpFileAttributes attributes,
Supplier<org.mule.runtime.api.connection.ConnectionHandler<FtpFileSystem>> connectionHandler) |
close, isLockedprotected FtpInputStream(Supplier<InputStream> streamSupplier, org.mule.runtime.api.util.LazyValue<org.mule.runtime.api.connection.ConnectionHandler<FtpFileSystem>> connectionHandler, org.mule.extension.file.common.api.lock.PathLock lock)
protected static org.mule.runtime.api.connection.ConnectionHandler<FtpFileSystem> getConnectionHandler(FtpConnector config) throws org.mule.runtime.api.connection.ConnectionException
org.mule.runtime.api.connection.ConnectionExceptionprotected static Supplier<InputStream> getStreamSupplier(FtpFileAttributes attributes, Supplier<org.mule.runtime.api.connection.ConnectionHandler<FtpFileSystem>> connectionHandler)
protected void doClose()
throws IOException
doClose in class org.mule.extension.file.common.api.stream.AbstractFileInputStreamIOExceptionprotected void beforeClose()
throws IOException
IOExceptionprotected FtpFileSystem getFtpFileSystem()
FtpFileSystem used to obtain the streamCopyright © 2018 MuleSoft, Inc.. All rights reserved.