public final class HostsFileParser
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.util.Map<java.lang.String,java.net.InetAddress> |
parse()
Parse hosts file at standard OS location.
|
static java.util.Map<java.lang.String,java.net.InetAddress> |
parse(java.io.File file)
Parse a hosts file.
|
static java.util.Map<java.lang.String,java.net.InetAddress> |
parse(java.io.Reader reader)
Parse a reader of hosts file format.
|
static java.util.Map<java.lang.String,java.net.InetAddress> |
parseSilently()
Parse hosts file at standard OS location.
|
public static java.util.Map<java.lang.String,java.net.InetAddress> parseSilently()
InetAddresspublic static java.util.Map<java.lang.String,java.net.InetAddress> parse()
throws java.io.IOException
InetAddressjava.io.IOException - file could not be readpublic static java.util.Map<java.lang.String,java.net.InetAddress> parse(java.io.File file)
throws java.io.IOException
file - the file to be parsedInetAddressjava.io.IOException - file could not be readpublic static java.util.Map<java.lang.String,java.net.InetAddress> parse(java.io.Reader reader)
throws java.io.IOException
reader - the file to be parsedInetAddressjava.io.IOException - file could not be readCopyright © 2018. All Rights Reserved.