FTPTask.Granularity (Apache Ant API)
Date: 2012-02-26

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tools.ant.taskdefs.optional.net
Class FTPTask.Granularity

    java.lang.Object
      org.apache.tools.ant.types.EnumeratedAttribute
          org.apache.tools.ant.taskdefs.optional.net.FTPTask.Granularity

Enclosing class:
  FTPTask

    public static class FTPTask.Granularity

extends EnumeratedAttribute

represents one of the valid timestamp adjustment values recognized by the `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.

Field Summary

Fields inherited from class org.apache.tools.ant.types.EnumeratedAttribute
`value`

Constructor Summary
`FTPTask.Granularity()`

Method Summary
`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.

Methods inherited from class org.apache.tools.ant.types.EnumeratedAttribute
`containsValue, getIndex, getInstance, getValue, indexOfValue, setValue, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### FTPTask.Granularity

    public FTPTask.Granularity()

Method Detail

### getValues

    public java.lang.String[] getValues()

  Get the valid values.

  Specified by:
    `getValues` in class `EnumeratedAttribute`
  Returns:
    the list of valid Granularity values

### getMilliseconds

    public 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.

  Parameters:
    `action` - SEND_FILES or GET_FILES
  Returns:
    the number of milliseconds associated with the attribute, in the context of the supplied action

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD