| java.lang.Object org.xbill.DNS.TTL
TTL | final public class TTL (Code) | | Routines for parsing BIND-style TTL values. These values consist of
numbers followed by 1 letter units of time (W - week, D - day, H - hour,
M - minute, S - second).
author: Brian Wellington |
Field Summary | |
final public static long | MAX_VALUE |
Method Summary | |
static void | check(long i) | public static String | format(long ttl) | public static long | parse(String s, boolean clamp) Parses a TTL-like value, which can either be expressed as a number or a
BIND-style string with numbers and units.
Parameters: s - The string representing the numeric value. Parameters: clamp - Whether to clamp values in the range [MAX_VALUE + 1, 2^32 -1]to MAX_VALUE. | public static long | parseTTL(String s) Parses a TTL, which can either be expressed as a number or a BIND-style
string with numbers and units. |
MAX_VALUE | final public static long MAX_VALUE(Code) | | |
check | static void check(long i)(Code) | | |
parse | public static long parse(String s, boolean clamp)(Code) | | Parses a TTL-like value, which can either be expressed as a number or a
BIND-style string with numbers and units.
Parameters: s - The string representing the numeric value. Parameters: clamp - Whether to clamp values in the range [MAX_VALUE + 1, 2^32 -1]to MAX_VALUE. This should be donw for TTLs, but not other values whichcan be expressed in this format. The value as a number of seconds throws: NumberFormatException - The string was not in a valid TTL format. |
parseTTL | public static long parseTTL(String s)(Code) | | Parses a TTL, which can either be expressed as a number or a BIND-style
string with numbers and units.
Parameters: s - The string representing the TTL The TTL as a number of seconds throws: NumberFormatException - The string was not in a valid TTL format. |
|
|