Class ScpTimestamp


  • public class ScpTimestamp
    extends java.lang.Object
    Represents an SCP timestamp definition
    • Field Detail

      • lastModifiedTime

        private final long lastModifiedTime
      • lastAccessTime

        private final long lastAccessTime
    • Constructor Detail

      • ScpTimestamp

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

      • getLastModifiedTime

        public long getLastModifiedTime()
      • getLastAccessTime

        public long getLastAccessTime()
      • toString

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

        public static ScpTimestamp parseTime​(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
        Returns:
        The ScpTimestamp value with the timestamps converted to milliseconds
        Throws:
        java.lang.NumberFormatException - if bad numerical values - Note: does not check if 1st character is 'T'.
        See Also:
        How the SCP protocol works