Class ResolvConf
java.lang.Object
io.netty.resolver.dns.ResolvConf
Looks up the
nameservers from the /etc/resolv.conf file, intended for Linux and macOS.-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static ResolvConfReads the given file and extracts thenameservers using the syntax of the/etc/resolv.conffile, seeman resolv.conf.(package private) static ResolvConffromReader(BufferedReader reader) Reads from the given reader and extracts thenameservers using the syntax of the/etc/resolv.conffile, seeman resolv.conf.(package private) List<InetSocketAddress> (package private) static ResolvConfsystem()Returns thenameservers from the/etc/resolv.conffile.
-
Field Details
-
nameservers
-
-
Constructor Details
-
ResolvConf
- Throws:
IOException
-
-
Method Details
-
fromReader
Reads from the given reader and extracts thenameservers using the syntax of the/etc/resolv.conffile, seeman resolv.conf.- Parameters:
reader- contents ofresolv.confare read from thisBufferedReader, up to the caller to close it- Throws:
IOException
-
fromFile
Reads the given file and extracts thenameservers using the syntax of the/etc/resolv.conffile, seeman resolv.conf.- Throws:
IOException
-
system
Returns thenameservers from the/etc/resolv.conffile. The file is only read once during the lifetime of this class. -
getNameservers
List<InetSocketAddress> getNameservers()
-