Skip to content

mdebenito/UserAgentProvider

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UserAgentProvider

Random User Agent string provider for Java.

Maven dependency:

<repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
</repository>
<dependency>
    <groupId>com.github.mdebenito</groupId>
    <artifactId>UserAgentProvider</artifactId>
    <version>master-SNAPSHOT</version>
</dependency>

Javadoc

Constructor Summary

Constructor and Description
UserAgentStringLoader()
Default constructor, initializes the list and loads the strings into it from the configuration file.

Method Summary

Modifier and Type Method and Description
java.lang.String getRandomUserAgentString()
Randomly selects one of the configured User Agent strings and returns it.
java.util.List<java.lang.String> getUserAgentStrings()
Returns the current list of User Agent strings.

Constructor Detail

  • UserAgentStringLoader

    public UserAgentStringLoader()
                          throws java.io.FileNotFoundException
    Default constructor, initializes the list and loads the strings into it from the configuration file.
    Throws:
    java.io.FileNotFoundException

Method Detail

  • getUserAgentStrings

    public java.util.List<java.lang.String> getUserAgentStrings()
    Returns the current list of User Agent strings.
    Returns:
    a List object that contains all the User Agent Strings configured.
  • getRandomUserAgentString

    public java.lang.String getRandomUserAgentString()
    Randomly selects one of the configured User Agent strings and returns it.
    Returns:
    A random User Agent string.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages