org.rhq.plugins.hosts.helper
Class Hosts

java.lang.Object
  extended by org.rhq.plugins.hosts.helper.Hosts

public class Hosts
extends Object

A set of hosts file entries.

Author:
Ian Springer

Constructor Summary
Hosts()
           
 
Method Summary
 void addEntry(HostsEntry entry)
           
 Set<HostsEntry> getEntries()
           
 Set<HostsEntry> getIpv4EntriesByName(String canonicalName)
           
 Set<HostsEntry> getIpv6EntriesByName(String canonicalName)
           
static Hosts load(File hostsFile)
           
static void store(Hosts hosts, File hostsFile)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Hosts

public Hosts()
Method Detail

addEntry

public void addEntry(HostsEntry entry)

getEntries

public Set<HostsEntry> getEntries()

getIpv4EntriesByName

public Set<HostsEntry> getIpv4EntriesByName(String canonicalName)

getIpv6EntriesByName

public Set<HostsEntry> getIpv6EntriesByName(String canonicalName)

load

public static Hosts load(File hostsFile)
                  throws IOException
Throws:
IOException

store

public static void store(Hosts hosts,
                         File hostsFile)
                  throws IOException
Throws:
IOException


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.