public class LocalFileScpSourceStreamResolver extends AbstractLoggingBean implements ScpSourceStreamResolver
| Modifier and Type | Field and Description |
|---|---|
protected Path |
name |
protected ScpFileOpener |
opener |
protected Path |
path |
protected Set<PosixFilePermission> |
perms |
protected long |
size |
protected ScpTimestamp |
time |
log| Constructor and Description |
|---|
LocalFileScpSourceStreamResolver(Path path,
ScpFileOpener opener) |
| 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() |
getSimplifiedLoggerprotected final Path path
protected final ScpFileOpener opener
protected final Path name
protected final Set<PosixFilePermission> perms
protected final long size
protected final ScpTimestamp time
public LocalFileScpSourceStreamResolver(Path path, ScpFileOpener opener) throws IOException
IOExceptionpublic String getFileName() throws IOException
getFileName in interface ScpSourceStreamResolverIOException - If failed to resolve the namepublic 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 Path getEventListenerFilePath()
getEventListenerFilePath in interface ScpSourceStreamResolverPath to use when invoking the ScpTransferEventListenerpublic 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.