|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.icann.tld.TldVerify
public class TldVerify
A class that lets you verify the existence of a domain
Field Summary | |
---|---|
static java.lang.String |
TLD_CACHE_FILE
Default Cache file name |
Constructor Summary | |
---|---|
TldVerify()
|
Method Summary | |
---|---|
void |
refreshTldDB()
Updates the copy of the fixed database of valid top-level domains. |
void |
refreshTldDB(java.lang.String cacheStoreFileName)
Updates the copy of the fixed database of valid top-level domains. |
boolean |
verifyTld(java.lang.String domainName)
Verifies a top-level domain exists. |
boolean |
verifyTldOffline(java.lang.String domainName)
Verifies a top-level domain exists against a fixed database. |
boolean |
verifyTldOffline(java.lang.String domainName,
java.lang.String cacheFilePath)
Verifies a top-level domain exists against a fixed database. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String TLD_CACHE_FILE
Constructor Detail |
---|
public TldVerify()
Method Detail |
---|
public boolean verifyTld(java.lang.String domainName)
domainName
- a domain name or a TLD
true
if the top-leve domain exist false
public boolean verifyTldOffline(java.lang.String domainName) throws TLDVerifyException
refreshTldDB()
method.
domainName
- the domain name or a TLD to validate
true
if the top-leve domain exist false
TLDVerifyException
public boolean verifyTldOffline(java.lang.String domainName, java.lang.String cacheFilePath) throws TLDVerifyException
refreshTldDB()
method.
The second argument is the filename where the cache is stored.
The file format should be the same as the one IANA publish at (http://data.iana.org/TLD/tlds-alpha-by-domain.txt).
The version in the first line will be check against the current cache version to prevent loading of old data.
domainName
- The domain name or a TLD to validatecacheFilePath
- The full path to where the cache is stored.
true
if the top-leve domain exist false
TLDVerifyException
public void refreshTldDB() throws TLDVerifyException
TLDVerifyException
public void refreshTldDB(java.lang.String cacheStoreFileName) throws TLDVerifyException
cacheStoreFileName
- The full path to the file to store the cache in.
TLDVerifyException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |