You can get source code via git:
$ git clone git://github.com/odinliu/turl.git
Requirements:
- JDK 5.0 or higher, recommand JDK 6.0
- Apache Maven 2
Then compile it, because maven try to resolve dependencies via network, so you would better keep Internet connection.
$ mvn compile
If you want to pack Odichy Turl as a jar achive, execute following command:
$ mvn package
Then you can find the jar in your target folder.
See apidoc, which is generated by javadoc. Or check the org.odichy.turl.Main for details.
Using the following command to generate javadoc by maven:
$ mvn javadoc:javadoc
Basic usage:
UrlShorter32 shorter = new UrlShorter("http://odichy.org");
System.out.println(shorter.getShortenUrl());
To generate a random character array, you need to use org.odichy.turl.util.RandomBase. Then change the array in UrlShorter32.java or UrlShorter64.java.