public class DefaultScpStreamResolver extends Object implements ScpSourceStreamResolver
| Constructor and Description |
|---|
DefaultScpStreamResolver(String name,
Path mockPath,
Collection<PosixFilePermission> perms,
ScpTimestamp time,
long size,
InputStream local,
String cmd) |
| Modifier and Type | Method and Description |
|---|---|
Path |
getEventListenerFilePath() |
String |
getFileName() |
Collection<PosixFilePermission> |
getPermissions() |
long |
getSize() |
ScpTimestamp |
getTimestamp() |
InputStream |
resolveSourceStream(Session session,
OpenOption... options) |
String |
toString() |
public DefaultScpStreamResolver(String name, Path mockPath, Collection<PosixFilePermission> perms, ScpTimestamp time, long size, InputStream local, String cmd)
public String getFileName() throws IOException
getFileName in interface ScpSourceStreamResolverIOException - If failed to resolve the namepublic Path getEventListenerFilePath()
getEventListenerFilePath in interface ScpSourceStreamResolverPath to use when invoking the ScpTransferEventListenerpublic Collection<PosixFilePermission> getPermissions() throws IOException
getPermissions in interface ScpSourceStreamResolverIOException - If failed to generate the required permissionspublic ScpTimestamp getTimestamp() throws IOException
getTimestamp in interface ScpSourceStreamResolverScpTimestamp to use for uploading the file
if null then no need to send this informationIOException - If failed to generate the required datapublic long getSize()
throws IOException
getSize in interface ScpSourceStreamResolverIOException - If failed to generate an estimatepublic InputStream resolveSourceStream(Session session, OpenOption... options) throws IOException
resolveSourceStream in interface ScpSourceStreamResolversession - The Session through which file is transmittedoptions - The OpenOptions may be null/emptyInputStream containing the data to be uploadedIOException - If failed to create the streamCopyright © 2008–2017 The Apache Software Foundation. All rights reserved.