Skip to content

tezc/URL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

URL

URL parser for java without temporary string objects.

This is useful when you are required to parse lots of URL and decrease pressure on GC. Parsed parts are presented as CharSequences.

        URL url = new URL("http://domain.com/some-path?user=jane&user=john#frag");
        
        CharSequence scheme = url.getScheme();
        if (scheme.equals("http")) {
            System.out.println("Scheme is http");
        }
        
        Map<CharSequence, URL.QueryItem> items = url.getQueryItems();
        URL.QueryItem values = items.get("user");
        while (values != null) {
            System.out.println("user : " + values.value);
            values = values.next;
        }

About

URL parser

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages