org.xbill.DNS
Class TTL
java.lang.Object
org.xbill.DNS.TTL
- public final class TTL
- extends Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
parseTTL
public static long parseTTL(String s)
- Parses a BIND-stype TTL
- Returns:
- The TTL as a number of seconds
- Throws:
NumberFormatException
- The TTL was not a valid TTL.
format
public static String format(long ttl)