public interface ScpSourceStreamResolver
| Modifier and Type | Method and Description |
|---|---|
default void |
closeSourceStream(Session session,
long fileSize,
java.util.Set<java.nio.file.attribute.PosixFilePermission> permissions,
java.io.InputStream stream)
Called when the stream obtained from
resolveSourceStream is no longer needed since since file copy was completed successfully. |
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 fileSize,
java.util.Set<java.nio.file.attribute.PosixFilePermission> permissions,
java.nio.file.OpenOption... options) |
java.lang.String getFileName()
throws java.io.IOException
java.io.IOException - If failed to resolve the namejava.nio.file.Path getEventListenerFilePath()
Path to use when invoking the ScpTransferEventListenerjava.util.Collection<java.nio.file.attribute.PosixFilePermission> getPermissions()
throws java.io.IOException
java.io.IOException - If failed to generate the required permissionsScpTimestamp getTimestamp() throws java.io.IOException
ScpTimestamp to use for uploading the file if null then no need to send
this informationjava.io.IOException - If failed to generate the required datalong getSize()
throws java.io.IOException
java.io.IOException - If failed to generate an estimatejava.io.InputStream resolveSourceStream(Session session, long fileSize, java.util.Set<java.nio.file.attribute.PosixFilePermission> permissions, java.nio.file.OpenOption... options) throws java.io.IOException
session - The Session through which file is transmittedfileSize - 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 streamdefault void closeSourceStream(Session session, long fileSize, java.util.Set<java.nio.file.attribute.PosixFilePermission> permissions, java.io.InputStream stream) throws java.io.IOException
resolveSourceStream is no longer needed since since file copy was completed successfully.session - The Session through which file is transmittedfileSize - The expected transfer byte countpermissions - The requested file permissionsstream - The InputStream to closejava.io.IOException - If failed to close the stream - Note: stream will be closed regardless of whether this
method throws an exception or not.