public class LocalFileScpSourceStreamResolver extends AbstractLoggingBean implements ScpSourceStreamResolver
| Modifier and Type | Field and Description |
|---|---|
protected java.nio.file.Path |
name |
protected ScpFileOpener |
opener |
protected java.nio.file.Path |
path |
protected java.util.Set<java.nio.file.attribute.PosixFilePermission> |
perms |
protected long |
size |
protected ScpTimestamp |
time |
log| Constructor and Description |
|---|
LocalFileScpSourceStreamResolver(java.nio.file.Path path,
ScpFileOpener opener) |
| Modifier and Type | Method and Description |
|---|---|
java.nio.file.Path |
getEventListenerFilePath() |
java.lang.String |
getFileName() |
java.util.Collection<java.nio.file.attribute.PosixFilePermission> |
getPermissions() |
long |
getSize() |
ScpTimestamp |
getTimestamp() |
java.io.InputStream |
resolveSourceStream(Session session,
long length,
java.util.Set<java.nio.file.attribute.PosixFilePermission> permissions,
java.nio.file.OpenOption... options) |
java.lang.String |
toString() |
getSimplifiedLoggerprotected final java.nio.file.Path path
protected final ScpFileOpener opener
protected final java.nio.file.Path name
protected final java.util.Set<java.nio.file.attribute.PosixFilePermission> perms
protected final long size
protected final ScpTimestamp time
public LocalFileScpSourceStreamResolver(java.nio.file.Path path,
ScpFileOpener opener)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String getFileName()
throws java.io.IOException
getFileName in interface ScpSourceStreamResolverjava.io.IOException - If failed to resolve the namepublic java.util.Collection<java.nio.file.attribute.PosixFilePermission> getPermissions()
throws java.io.IOException
getPermissions in interface ScpSourceStreamResolverjava.io.IOException - If failed to generate the required permissionspublic ScpTimestamp getTimestamp() throws java.io.IOException
getTimestamp in interface ScpSourceStreamResolverScpTimestamp to use for uploading the file
if null then no need to send this informationjava.io.IOException - If failed to generate the required datapublic long getSize()
throws java.io.IOException
getSize in interface ScpSourceStreamResolverjava.io.IOException - If failed to generate an estimatepublic java.nio.file.Path getEventListenerFilePath()
getEventListenerFilePath in interface ScpSourceStreamResolverPath to use when invoking the ScpTransferEventListenerpublic java.io.InputStream resolveSourceStream(Session session, long length, java.util.Set<java.nio.file.attribute.PosixFilePermission> permissions, java.nio.file.OpenOption... options) throws java.io.IOException
resolveSourceStream in interface ScpSourceStreamResolversession - The Session through which file is transmittedlength - The expected transfer byte countpermissions - The requested file permissionsoptions - The OpenOptions may be null/emptyInputStream containing the data to be uploadedjava.io.IOException - If failed to create the streampublic java.lang.String toString()
toString in class java.lang.Object