Class ScpTimestampCommandDetails

    • Field Detail

      • lastModifiedTime

        private final long lastModifiedTime
      • lastAccessTime

        private final long lastAccessTime
    • Constructor Detail

      • ScpTimestampCommandDetails

        public ScpTimestampCommandDetails​(java.lang.String header)
      • ScpTimestampCommandDetails

        public ScpTimestampCommandDetails​(java.nio.file.attribute.FileTime modTime,
                                          java.nio.file.attribute.FileTime accTime)
      • ScpTimestampCommandDetails

        public ScpTimestampCommandDetails​(long modTime,
                                          long accTime)
    • Method Detail

      • getLastModifiedTime

        public long getLastModifiedTime()
      • getLastAccessTime

        public long getLastAccessTime()
      • toHeader

        public java.lang.String toHeader()
        Specified by:
        toHeader in class AbstractScpCommandDetails
        Returns:
        The equivalent SCP command header represented by these details
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • parse

        public static ScpTimestampCommandDetails parse​(java.lang.String line)
                                                throws java.lang.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 if null
        Returns:
        The ScpTimestampCommandDetails value with the timestamps converted to milliseconds
        Throws:
        java.lang.NumberFormatException - if bad numerical values - Note: validates that 1st character is 'T'.
        See Also:
        How the SCP protocol works