public static interface HostsFileEntriesProvider.Parser
限定符和类型 | 方法和说明 |
---|---|
HostsFileEntriesProvider |
parse()
Parses the hosts file at standard OS location using the system default
Charset for decoding. |
HostsFileEntriesProvider |
parse(java.nio.charset.Charset... charsets)
Parses the hosts file at standard OS location using the given
Charset s one after another until
parse something or none is left. |
HostsFileEntriesProvider |
parse(java.io.File file,
java.nio.charset.Charset... charsets)
Parses the provided hosts file using the given
Charset s one after another until
parse something or none is left. |
HostsFileEntriesProvider |
parse(java.io.Reader reader)
Performs the parsing operation using the provided reader of hosts file format.
|
HostsFileEntriesProvider |
parseSilently()
Parses the hosts file at standard OS location using the system default
Charset for decoding. |
HostsFileEntriesProvider |
parseSilently(java.nio.charset.Charset... charsets)
Parses the hosts file at standard OS location using the given
Charset s one after another until
parse something or none is left. |
HostsFileEntriesProvider |
parseSilently(java.io.File file,
java.nio.charset.Charset... charsets)
Parses the provided hosts file using the given
Charset s one after another until
parse something or none is left. |
HostsFileEntriesProvider parse() throws java.io.IOException
Charset
for decoding.HostsFileEntriesProvider
java.io.IOException
- file could not be readHostsFileEntriesProvider parse(java.nio.charset.Charset... charsets) throws java.io.IOException
Charset
s one after another until
parse something or none is left.charsets
- the Charset
s to try as file encodings when parsingHostsFileEntriesProvider
java.io.IOException
- file could not be readHostsFileEntriesProvider parse(java.io.File file, java.nio.charset.Charset... charsets) throws java.io.IOException
Charset
s one after another until
parse something or none is left. In case Charset
s are not provided,
the system default Charset
is used for decoding.file
- the file to be parsedcharsets
- the Charset
s to try as file encodings when parsing, in case Charset
s
are not provided, the system default Charset
is used for decodingHostsFileEntriesProvider
java.io.IOException
- file could not be readHostsFileEntriesProvider parse(java.io.Reader reader) throws java.io.IOException
reader
- the reader of hosts file formatHostsFileEntriesProvider
java.io.IOException
HostsFileEntriesProvider parseSilently()
Charset
for decoding.HostsFileEntriesProvider
HostsFileEntriesProvider parseSilently(java.nio.charset.Charset... charsets)
Charset
s one after another until
parse something or none is left.charsets
- the Charset
s to try as file encodings when parsingHostsFileEntriesProvider
HostsFileEntriesProvider parseSilently(java.io.File file, java.nio.charset.Charset... charsets)
Charset
s one after another until
parse something or none is left. In case Charset
s are not provided,
the system default Charset
is used for decoding.file
- the file to be parsedcharsets
- the Charset
s to try as file encodings when parsing, in case Charset
s
are not provided, the system default Charset
is used for decodingHostsFileEntriesProvider