Urlize Those Java Properties

Jan14

I decided to (finally) post some code here.
This is a java class (java is that respected language in the corps, not python) i use a lot in some projects that will give you extra configuration feature set.
I find it really useful to have centralized configuration files in a webserver, since it's really simple to reconfigure that app running somewhere in the network.
This way i just vi the file and introduce the new configuration so that the app is ready to run.

Code:

import java.net.URL;
import java.util.Properties;
import java.io.InputStream;

public class URLProperties extends Properties
{
    public URLProperties(String url) throws Exception
    {
            super();

            InputStream istream = (new URL(url)).openStream();
            this.load(istream);
            istream.close();
    }
}

Now, i know that this should be in the code section of this blog.
I also know that the code, about and photo sections are not working (sweet 404 eh?).
They will sooon (sooon is longer than soon, really).

networking java code

spoonman said (6 months, 1 week ago)

better sooon (or soon) than never! :)

[]


You said:

you can use Markdown.