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

## net.i2p.client.naming
Class HostsTxtNamingService

    java.lang.Object
      net.i2p.client.naming.NamingService
          net.i2p.client.naming.HostsTxtNamingService

    public class HostsTxtNamingService

extends NamingService

A naming service based on the "hosts.txt" file.

Field Summary
`static String` | `DEFAULT_HOSTS_FILE` default hosts.txt filename
`static String` | `PROP_B32`
`static String` | `PROP_HOSTS_FILE` If this system property is specified, the tunnel will read the given file for hostname=destKey values when resolving names

Fields inherited from class net.i2p.client.naming.NamingService
`_context, CACHE_MAX_AGE, CACHE_MAX_SIZE, PROP_IMPL`

Constructor Summary
`HostsTxtNamingService(I2PAppContext context)` The naming service should only be constructed and accessed through the application context.

Method Summary
`Destination` | `lookup(String hostname)` Look up a host name.
`String` | `reverseLookup(Destination dest)` Reverse look up a destination
`String` | `reverseLookup(Hash h)` Deprecated. unused

Methods inherited from class net.i2p.client.naming.NamingService
`clearCache, createInstance, getCache, lookupBase64, putCache`

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

Field Detail

### PROP_HOSTS_FILE

    public static final String PROP_HOSTS_FILE

  If this system property is specified, the tunnel will read the given file for hostname=destKey values when resolving names

  See Also:
    Constant Field Values

### PROP_B32

    public static final String PROP_B32

See Also:
  Constant Field Values

### DEFAULT_HOSTS_FILE

    public static final String DEFAULT_HOSTS_FILE

  default hosts.txt filename

  See Also:
    Constant Field Values

Constructor Detail

### HostsTxtNamingService

    public HostsTxtNamingService(I2PAppContext context)

  The naming service should only be constructed and accessed through the application context. This constructor should only be used by the appropriate application context itself.

Method Detail

### lookup

    public Destination lookup(String hostname)

  Description copied from class: `NamingService`
  Look up a host name.

  Specified by:
    `lookup` in class `NamingService`
  Returns:
    the Destination for this host name, or `null` if name is unknown.

### reverseLookup

    public String reverseLookup(Destination dest)

  Description copied from class: `NamingService`
  Reverse look up a destination

  Overrides:
    `reverseLookup` in class `NamingService`
  Returns:
    a host name for this Destination, or `null` if none is known. It is safe for subclasses to always return `null` if no reverse lookup is possible.

### reverseLookup

    public String reverseLookup(Hash h)

  Deprecated. unused

  Overrides:
    `reverseLookup` in class `NamingService`

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