class SyslogUtils {

  public static String getHostname(SocketAddress socketAddress) {
    try {
      InetSocketAddress inetSocketAddress = (InetSocketAddress) socketAddress;
      String hostname = inetSocketAddress.getHostName();
      if (hostname != null) {
        return hostname;
      } else {
        throw new NullPointerException("The returned hostname is null");
      }
    } catch (Exception e) {
      logger.warn("Unable to retrieve client hostname", e);
    }
    // return a safe value instead of null
    return "";
  }

  public  SyslogUtils();
  public  SyslogUtils(boolean isUdp);
  public  SyslogUtils(Integer defaultSize, Set<String> keepFields, boolean isUdp);
  public  SyslogUtils(Integer eventSize, Set<String> keepFields, boolean isUdp, Clock clock);

}