com.github.phantomthief.util.UnifiedNameService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of more-lambdas Show documentation
Show all versions of more-lambdas Show documentation
Some useful lambda implements for Java 8.
package com.github.phantomthief.util;
import java.net.InetAddress;
import java.net.UnknownHostException;
/**
* 提供API方式注入NameService,兼容jdk8和jdk9+
* 具体参考 {@link NameServiceUtils#getCurrentNameService()} 和 {@link NameServiceUtils#setNameService(UnifiedNameService)}
*
* @author w.vela
* Created on 2019-12-25.
*/
public interface UnifiedNameService {
InetAddress[] lookupAllHostAddr(String host) throws UnknownHostException;
String getHostByAddr(byte[] addr) throws UnknownHostException;
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy