All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.litongjava.tio.utils.http.useragent.UserAgentUtil Maven / Gradle / Ivy

There is a newer version: 3.7.3.v202400213-RELEASE
Show newest version
package com.litongjava.tio.utils.http.useragent;

/**
 * User-Agent工具类
 * 
 * @author looly
 *
 */
public class UserAgentUtil {

  /**
   * 解析User-Agent
   * 
   * @param userAgentString User-Agent字符串
   * @return {@link UserAgent}
   */
  public static UserAgent parse(String userAgentString) {
    return UserAgentParser.parse(userAgentString);
  }

  public static boolean isWechat(String userAgentString) {
    return userAgentString.contains("WeChat/");
  }

  public static boolean isQQ(String userAgentString) {
    return userAgentString.contains("QQ/");
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy