Class Host

java.lang.Object
org.fisco.bcos.sdk.utils.Host

public class Host
extends java.lang.Object
Verify host and port, and extract host or port from string.
  • Constructor Summary

    Constructors 
    Constructor Description
    Host()  
  • Method Summary

    Modifier and Type Method Description
    static java.lang.String getIpFromString​(java.lang.String IPAndPort)
    Get ip from IPAndPort string
    static java.lang.String getPortFromString​(java.lang.String IPAndPort)
    Get port from IPAndPort string
    static boolean validIP​(java.lang.String IP)  
    static boolean validPort​(java.lang.String port)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Host

      public Host()
  • Method Details

    • validIP

      public static boolean validIP​(java.lang.String IP)
      Parameters:
      IP - the IP string of host
      Returns:
      true if IP valid IP string otherwise false
    • validPort

      public static boolean validPort​(java.lang.String port)
      Parameters:
      port - the port string
      Returns:
      true if port valid IP port otherwise false
    • getIpFromString

      public static java.lang.String getIpFromString​(java.lang.String IPAndPort)
      Get ip from IPAndPort string
      Parameters:
      IPAndPort - the combine of IP and port string
      Returns:
      String of IP address
    • getPortFromString

      public static java.lang.String getPortFromString​(java.lang.String IPAndPort)
      Get port from IPAndPort string
      Parameters:
      IPAndPort - the combine of IP and port string
      Returns:
      String of port.