modified,
accessed,
or created.
Instances of this class are immutable.
java.nio.file.Files#setLastModifiedTime , java.nio.file.Files#getLastModifiedTime
| Modifier and Type | Field and Description |
|---|---|
| private static final long | |
| private static final long | HOURS_PER_DAY
Time unit constants for conversion. |
| private Instant | instant
The value as Instant (created lazily, if not from an instant) |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final int | |
| private static final int | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long | |
| private final TimeUnit | unit
The unit of granularity to interpret the value. |
| private final long | value
The value since the epoch; can be negative. |
| private String | valueAsString
The value return by toString (created lazily) |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private StringBuilder | |
| public int | Returns: 0 if this FileTime is equal to other, a
value less than 0 if this FileTime represents a time
that is before other, and a value greater than 0 if this
FileTime represents a time that is after otherthe other other)FileTime to be comparedImplements java. Compares the value of two |
| public boolean | Returns: true if, and only if, the given object is a FileTime that represents the same timethe object to compare with obj)Overrides java. Tests this |
| public static FileTime | |
| public static FileTime | |
| public static FileTime | Returns: aFileTime representing the given valuethe value, in milliseconds, since the epoch
(1970-01-01T00:00:00Z); can be negative value)Returns a |
| public int | Returns: the hash-code valueOverrides java. Computes a hash code for this file time. |
| private static long | |
| public long | |
| private long | |
| private long | |
| public Instant | Returns: an instant representing the same point on the time-line as thisFileTime objectConverts this |
| public long | Returns: the value in milliseconds, since the epoch (1970-01-01T00:00:00Z)Returns the value in milliseconds. |
| public String | Returns: the string representation of this file timeOverrides java. Returns the string representation of this |
| DAYS_PER_10000_YEARS | back to summary |
|---|---|
| private static final long DAYS_PER_10000_YEARS | |
| HOURS_PER_DAY | back to summary |
|---|---|
| private static final long HOURS_PER_DAY Time unit constants for conversion. | |
| instant | back to summary |
|---|---|
| private Instant instant The value as Instant (created lazily, if not from an instant) | |
| MAX_SECOND | back to summary |
|---|---|
| private static final long MAX_SECOND | |
| MICROS_PER_SECOND | back to summary |
|---|---|
| private static final long MICROS_PER_SECOND | |
| MILLIS_PER_SECOND | back to summary |
|---|---|
| private static final long MILLIS_PER_SECOND | |
| MIN_SECOND | back to summary |
|---|---|
| private static final long MIN_SECOND | |
| MINUTES_PER_HOUR | back to summary |
|---|---|
| private static final long MINUTES_PER_HOUR | |
| NANOS_PER_MICRO | back to summary |
|---|---|
| private static final int NANOS_PER_MICRO | |
| NANOS_PER_MILLI | back to summary |
|---|---|
| private static final int NANOS_PER_MILLI | |
| NANOS_PER_SECOND | back to summary |
|---|---|
| private static final long NANOS_PER_SECOND | |
| SECONDS_0000_TO_1970 | back to summary |
|---|---|
| private static final long SECONDS_0000_TO_1970 | |
| SECONDS_PER_10000_YEARS | back to summary |
|---|---|
| private static final long SECONDS_PER_10000_YEARS | |
| SECONDS_PER_DAY | back to summary |
|---|---|
| private static final long SECONDS_PER_DAY | |
| SECONDS_PER_HOUR | back to summary |
|---|---|
| private static final long SECONDS_PER_HOUR | |
| SECONDS_PER_MINUTE | back to summary |
|---|---|
| private static final long SECONDS_PER_MINUTE | |
| unit | back to summary |
|---|---|
| private final TimeUnit unit The unit of granularity to interpret the value. Null if
this | |
| value | back to summary |
|---|---|
| private final long value The value since the epoch; can be negative. | |
| valueAsString | back to summary |
|---|---|
| private String valueAsString The value return by toString (created lazily) | |
| FileTime | back to summary |
|---|---|
| private FileTime(long value, TimeUnit unit, Instant instant) Initializes a new instance of this class. | |
| append | back to summary |
|---|---|
| private StringBuilder append(StringBuilder sb, int w, int d) | |
| compareTo | back to summary |
|---|---|
| public int compareTo(FileTime other) Implements java. Compares the value of two | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Tests this The result is | |
| from | back to summary |
|---|---|
| public static FileTime from(long value, TimeUnit unit) Returns a | |
| from | back to summary |
|---|---|
| public static FileTime from(Instant instant) Returns a | |
| fromMillis | back to summary |
|---|---|
| public static FileTime fromMillis(long value) Returns a
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Computes a hash code for this file time. The hash code is based upon the value represented, and satisfies the
general contract of the
| |
| scale | back to summary |
|---|---|
| private static long scale(long d, long m, long over) | |
| to | back to summary |
|---|---|
| public long to(TimeUnit unit) Returns the value at the given unit of granularity. Conversion from a coarser granularity that would numerically overflow
saturate to
| |
| toDays | back to summary |
|---|---|
| private long toDays() | |
| toExcessNanos | back to summary |
|---|---|
| private long toExcessNanos(long days) | |
| toInstant | back to summary |
|---|---|
| public Instant toInstant() Converts this The conversion creates an
| |
| toMillis | back to summary |
|---|---|
| public long toMillis() Returns the value in milliseconds. Conversion from a coarser granularity that would numerically overflow
saturate to
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns the string representation of this
YYYY-MM-DDThh:mm:ss[.s+]Z
where "[.s+]" represents a dot followed by one of more digits
for the decimal fraction of a second. It is only present when the decimal
fraction of a second is not zero. For example, FileTime.fromMillis(1234567890000L).toString() yields "2009-02-13T23:31:30Z", and FileTime.fromMillis(1234567890123L).toString()
yields "2009-02-13T23:31:30.123Z".
A
| |