public class Hosts extends Object
| Constructor and Description |
|---|
Hosts() |
| Modifier and Type | Method and Description |
|---|---|
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) |
public void addEntry(HostsEntry entry)
public Set<HostsEntry> getEntries()
public Set<HostsEntry> getIpv4EntriesByName(String canonicalName)
public Set<HostsEntry> getIpv6EntriesByName(String canonicalName)
public static Hosts load(File hostsFile) throws IOException
IOExceptionpublic static void store(Hosts hosts, File hostsFile) throws IOException
IOExceptionCopyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.