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

com.blazebit.text.URLFormat Maven / Gradle / Ivy

There is a newer version: 1.6.11
Show newest version
/*
 * Copyright 2011 Blazebit
 */
package com.blazebit.text;

import java.net.MalformedURLException;
import java.net.URL;

/**
 * @author Christian Beikov
 * @since 0.1.9
 */
public class URLFormat extends AbstractFormat {
    private static final long serialVersionUID = 1L;

    public URLFormat() {
        super(URL.class);
    }

    public URL parse(String value, ParserContext context) {
        try {
            return new URL(value);
        } catch (MalformedURLException e) {
            throw new IllegalArgumentException(e);
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy