예제 #1
0
  public static int getPortByProtocol(String protocol) {
    preloadServices();

    return mServices.containsKey(protocol) ? Integer.parseInt(mServices.get(protocol)) : 0;
  }
예제 #2
0
  public static String getProtocolByPort(String port) {
    preloadServices();

    return mPorts.containsKey(port) ? mPorts.get(port) : null;
  }