LoremIpsum4J is a Java class for generating Lorem Ipsum text. Lorem Ipsum is basically mockup text for printing and typesetting industry.
LoremIpsum4J uses web service in www.lipsum.com, which is excellent web site about Lorem Ipsum and also includes online generator of Lorem Ipsum paragraphs.
Download
Source code
Java class
Documentation
You can view the source code online.
JavaDoc for the class is also available.
Samples
Here are couple of code fragments that demonstrate LoremIpsum4J usage.
Generate 2 Lorem Ipsum paragraphs
LoremIpsum4J loremIpsum=new LoremIpsum4J();
String[] paragraphs=loremIpsum.getParagraphs(2);
getParagraphs() returns a string array that contains requested
paragraphs.
Similar functionality is available also for words.
Generate 42 Lorem Ipsum words
LoremIpsum4J loremIpsum=new LoremIpsum4J();
String[] paragraphs=loremIpsum.getWords(42);
getWords() returns array of lorem ipsum paragraphs that contain requested
number of words.
There are also methods getBytes() and getList() which work like the examples above.
Version history1.3.0 (19.03.2010)
-Changed license to GPLv3.
-Updated code to use Java generics (JDK 1.5 and later).
1.2 (27.10.2006)
-Added command line usage to LoremIpsum4J class.
Usage:
java com.softabar.lipsum.LoremIpsum4J [-type <paras | words | bytes>] [-amount number] [-start <true | false>]
|