play.utils.OrderSafeProperties Maven / Gradle / Ivy
package play.utils;
import net.sf.oval.internal.util.LinkedSet;
import org.apache.commons.codec.net.URLCodec;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.StringEscapeUtils;
import java.beans.Encoder;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.*;
/**
* Custom impl of java.util.properties that preserves the key-order from the file
* and that reads the properties-file in utf-8
*/
public class OrderSafeProperties extends java.util.Properties {
// set used to preserve key order
private final LinkedHashSet