Class ScpTimestampCommandDetails
- java.lang.Object
-
- org.apache.sshd.scp.common.helpers.AbstractScpCommandDetails
-
- org.apache.sshd.scp.common.helpers.ScpTimestampCommandDetails
-
public class ScpTimestampCommandDetails extends AbstractScpCommandDetails
Represents an SCP timestamp definition- Author:
- Apache MINA SSHD Project
-
-
Field Summary
Fields Modifier and Type Field Description static charCOMMAND_NAME-
Fields inherited from class org.apache.sshd.scp.common.helpers.AbstractScpCommandDetails
command
-
-
Constructor Summary
Constructors Constructor Description ScpTimestampCommandDetails(long modTime, long accTime)ScpTimestampCommandDetails(String header)ScpTimestampCommandDetails(FileTime modTime, FileTime accTime)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)longgetLastAccessTime()longgetLastModifiedTime()inthashCode()static ScpTimestampCommandDetailsparse(String line)StringtoHeader()StringtoString()-
Methods inherited from class org.apache.sshd.scp.common.helpers.AbstractScpCommandDetails
getCommand
-
-
-
-
Field Detail
-
COMMAND_NAME
public static final char COMMAND_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getLastModifiedTime
public long getLastModifiedTime()
-
getLastAccessTime
public long getLastAccessTime()
-
toHeader
public String toHeader()
- Specified by:
toHeaderin classAbstractScpCommandDetails- Returns:
- The equivalent SCP command header represented by these details
-
parse
public static ScpTimestampCommandDetails parse(String line) throws NumberFormatException
- Parameters:
line- The time specification - format:T<mtime-sec> <mtime-micros> <atime-sec> <atime-micros>where specified times are in seconds since UTC - ignored ifnull- Returns:
- The
ScpTimestampCommandDetailsvalue with the timestamps converted to milliseconds - Throws:
NumberFormatException- if bad numerical values - Note: validates that 1st character is 'T'.- See Also:
- How the SCP protocol works
-
-