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() |
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 ScpSourceStreamResolver
IOException
- If failed to resolve the namepublic Path getEventListenerFilePath()
getEventListenerFilePath
in interface ScpSourceStreamResolver
Path
to use when invoking the ScpTransferEventListener
public Collection<PosixFilePermission> getPermissions() throws IOException
getPermissions
in interface ScpSourceStreamResolver
IOException
- If failed to generate the required permissionspublic ScpTimestamp getTimestamp() throws IOException
getTimestamp
in interface ScpSourceStreamResolver
ScpTimestamp
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 ScpSourceStreamResolver
IOException
- If failed to generate an estimatepublic InputStream resolveSourceStream() throws IOException
resolveSourceStream
in interface ScpSourceStreamResolver
InputStream
containing the data to be uploadedIOException
- If failed to create the streamCopyright © 2008–2016 The Apache Software Foundation. All rights reserved.