public final class HostsFileParser extends Object
Modifier and Type | Method and Description |
---|---|
static Map<String,InetAddress> |
parse()
Parse hosts file at standard OS location.
|
static Map<String,InetAddress> |
parse(File file)
Parse a hosts file.
|
static Map<String,InetAddress> |
parse(Reader reader)
Parse a reader of hosts file format.
|
static Map<String,InetAddress> |
parseSilently()
Parse hosts file at standard OS location.
|
public static Map<String,InetAddress> parseSilently()
InetAddress
public static Map<String,InetAddress> parse() throws IOException
InetAddress
IOException
- file could not be readpublic static Map<String,InetAddress> parse(File file) throws IOException
file
- the file to be parsedInetAddress
IOException
- file could not be readpublic static Map<String,InetAddress> parse(Reader reader) throws IOException
reader
- the file to be parsedInetAddress
IOException
- file could not be readCopyright © 2008–2016 The Netty Project. All rights reserved.