Skip to content

Instantly share code, notes, and snippets.

@RainerW
RainerW / StringUtilsTest.java
Created September 25, 2012 11:32 — forked from chbaranowski/StringUtilsTest.java
Compate Apache Common Lang StringUtils split performance with Google Guava Splitter split method.
import com.google.common.base.Splitter;
import org.apache.commons.lang.RandomStringUtils;
import org.apache.commons.lang.math.RandomUtils;
import org.apache.commons.lang3.StringUtils;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.springframework.util.StopWatch;
import java.util.Iterator;
@RainerW
RainerW / StringUtilsTest.java
Created September 25, 2012 10:00 — forked from chbaranowski/StringUtilsTest.java
Compate Apache Common Lang StringUtils split performance with Google Guava Splitter split method.
package bausteine;
import com.google.common.base.Splitter;
import org.apache.commons.lang.RandomStringUtils;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.springframework.util.StopWatch;
import org.springframework.util.StringUtils;
package com.seitenbau.demo.systemtest;
import static com.seitenbau.assertions.Assertions.assertThat;
import javax.inject.Inject;
import org.junit.Test;
interface WorkDelegate<T> {
void doWork(T target);
}
@RainerW
RainerW / csvconvertor.groovy
Created June 3, 2011 17:38 — forked from chbaranowski/csvconvertor.groovy
Convert a CSV file into another CSV format.
public class CsvSplit
{
public static void main(String[] args) throws Exception
{
FileWriter out = new FileWriter("output.csv");
BufferedReader in = new BufferedReader(new FileReader("input.csv"));
String line;
while ((line = in.readLine()) != null)
{
String[] fields = line.split(";");
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import com.sun.javadoc.*;
import com.thoughtworks.xstream.XStream;
public class DocDoclet {
private static final String DOCU_XML_FILE = "docu.xml";