public static class FTP.Granularity extends EnumeratedAttribute
timestampGranularity
attribute.
A timestamp adjustment may be used in file transfers for checking
uptodateness. MINUTE means to add one minute to the server
timestamp. This is done because FTP servers typically list
timestamps HH:mm and client FileSystems typically use HH:mm:ss.
The default is to use MINUTE for PUT actions and NONE for GET
actions, since GETs have the preserveLastModified
option, which takes care of the problem in most use cases where
this level of granularity is an issue.
value
Constructor and Description |
---|
Granularity() |
Modifier and Type | Method and Description |
---|---|
long |
getMilliseconds(int action)
returns the number of milliseconds associated with
the attribute, which can vary in some cases depending
on the value of the action parameter.
|
java.lang.String[] |
getValues()
Get the valid values.
|
containsValue, getIndex, getInstance, getValue, indexOfValue, setValue, toString
public java.lang.String[] getValues()
getValues
in class EnumeratedAttribute
public long getMilliseconds(int action)
action
- SEND_FILES or GET_FILES