public class LocalFileScpTargetStreamResolver extends AbstractLoggingBean implements ScpTargetStreamResolver
log
Constructor and Description |
---|
LocalFileScpTargetStreamResolver(Path path) |
Modifier and Type | Method and Description |
---|---|
Path |
getEventListenerFilePath() |
void |
postProcessReceivedData(String name,
boolean preserve,
Set<PosixFilePermission> perms,
ScpTimestamp time)
Called after successful reception of the data (and after closing the stream)
|
OutputStream |
resolveTargetStream(String name,
long length,
Set<PosixFilePermission> perms)
Called when receiving a file in order to obtain an output stream
for the incoming data
|
String |
toString() |
protected void |
updateFileProperties(String name,
Path path,
Set<PosixFilePermission> perms,
ScpTimestamp time) |
public LocalFileScpTargetStreamResolver(Path path) throws IOException
IOException
public OutputStream resolveTargetStream(String name, long length, Set<PosixFilePermission> perms) throws IOException
ScpTargetStreamResolver
resolveTargetStream
in interface ScpTargetStreamResolver
name
- File name as received from remote sitelength
- Number of bytes expected to receiveperms
- The Set
of PosixFilePermission
expectedOutputStream
to write the incoming dataIOException
- If failed to create the streampublic Path getEventListenerFilePath()
getEventListenerFilePath
in interface ScpTargetStreamResolver
Path
to use when invoking the ScpTransferEventListener
public void postProcessReceivedData(String name, boolean preserve, Set<PosixFilePermission> perms, ScpTimestamp time) throws IOException
ScpTargetStreamResolver
postProcessReceivedData
in interface ScpTargetStreamResolver
name
- File name as received from remote sitepreserve
- If true
then the resolver should attempt to preserve
the specified permissions and timestampperms
- The Set
of PosixFilePermission
expectedtime
- If not null
then the required timestamp(s) on the
incoming dataIOException
- If failed to post-process the incoming dataprotected void updateFileProperties(String name, Path path, Set<PosixFilePermission> perms, ScpTimestamp time) throws IOException
IOException
Copyright © 2008–2016 The Apache Software Foundation. All rights reserved.