All Projects → mikaelhg → Urlbuilder

mikaelhg / Urlbuilder

Licence: apache-2.0
Java Builders: URL builder

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Urlbuilder

Grabana
User-friendly Go library for building Grafana dashboards
Stars: ✭ 313 (+79.89%)
Mutual labels:  builder, library
Java Markdown Generator
Java library to generate markdown
Stars: ✭ 159 (-8.62%)
Mutual labels:  builder, library
Markdown Builder
1kb Markdown builder for Node.js
Stars: ✭ 67 (-61.49%)
Mutual labels:  builder, library
Zgallery
Android 3rd party library to make implementing galleries more easier
Stars: ✭ 160 (-8.05%)
Mutual labels:  builder, library
Urlcat
A URL builder library for JavaScript.
Stars: ✭ 1,334 (+666.67%)
Mutual labels:  builder, url
Furl
🌐 URL parsing and manipulation made easy.
Stars: ✭ 2,152 (+1136.78%)
Mutual labels:  library, url
New Github Issue Url
Generate a URL for opening a new GitHub issue with prefilled title, body, and other fields
Stars: ✭ 170 (-2.3%)
Mutual labels:  url
Cutintolayout
CutIntoLayout allows you to erase the background.
Stars: ✭ 172 (-1.15%)
Mutual labels:  library
Mctrl
C library providing set of additional user interface controls for Windows, intended to be complementary to standard Win32API controls from USER32.DLL and COMCTL32.DLL.
Stars: ✭ 169 (-2.87%)
Mutual labels:  library
Acl Anthology
Data and software for building the ACL Anthology.
Stars: ✭ 168 (-3.45%)
Mutual labels:  library
Bluetooth Library
Bluetooth client library for Android.
Stars: ✭ 172 (-1.15%)
Mutual labels:  library
Tracy
C++ frame profiler
Stars: ✭ 3,115 (+1690.23%)
Mutual labels:  library
Json Api
Implementation of JSON API in PHP 7
Stars: ✭ 171 (-1.72%)
Mutual labels:  library
Terraform Aws Components
Opinionated, self-contained Terraform root modules that each solve one, specific problem
Stars: ✭ 168 (-3.45%)
Mutual labels:  library
Riscv Fs
F# RISC-V Instruction Set formal specification
Stars: ✭ 173 (-0.57%)
Mutual labels:  library
Libgrape Lite
🍇 A C++ library for parallel graph processing 🍇
Stars: ✭ 169 (-2.87%)
Mutual labels:  library
Move To Library Sketchplugin
You can now move symbol from your project to any library and re-attach all the symbol instances to this library. also it keep the overrides without any problems and it work with abstract that have libraries not in your local machine
Stars: ✭ 174 (+0%)
Mutual labels:  library
Adaptive Tab Bar
AdaptiveController is a 'Progressive Reduction' Swift UI module for adding custom states to Native or Custom iOS UI elements. Swift UI component by @Ramotion
Stars: ✭ 2,032 (+1067.82%)
Mutual labels:  library
Confetti.js
A simple confetti animation for your website :)
Stars: ✭ 170 (-2.3%)
Mutual labels:  library
Crawler Commons
A set of reusable Java components that implement functionality common to any web crawler
Stars: ✭ 173 (-0.57%)
Mutual labels:  library

Java URL builder

Build Status Coverage Status Maven Central

Create and modify URLs and URL parameters easily, with a builder class.

Builder instances are immutable, thread-safe and reusable. Every change creates a new instance.

UrlBuilder.fromString("http://www.google.com/")
    .addParameter("q", "charlie brown")
    .toString() == "http://www.google.com/?q=charlie+brown"

UrlBuilder.fromString("http://foo/h%F6pl%E4", "ISO-8859-1")
    .encodeAs("UTF-8")
    .toString() == "http://foo/h%C3%B6pl%C3%A4"

final UrlBuilder ub1 = UrlBuilder.empty()
    .withScheme("http")
    .withHost("www.example.com")
    .withPath("/")
    .addParameter("foo", "bar");

final java.net.URI uri1 = ub1.toUri();

try {
    final java.net.URI uri2 = ub1.toUriWithException();
} catch (java.net.URISyntaxException ex) {
    // handle the exception
}

final java.net.URL url1 = ub1.toUrl();

try {
    final java.net.URL url2 = ub1.toUrlWithException();
} catch (java.net.MalformedURLException ex) {
    // handle the exception
}

Todo:

  • More unit tests for corner cases. Please send in pull requests, your help is needed.

Use with Maven:

<dependencies>
    <dependency>
        <groupId>io.mikael</groupId>
        <artifactId>urlbuilder</artifactId>
        <version>2.0.9</version>
    </dependency>
</dependencies>
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].