play.utils.OrderSafeProperties Maven / Gradle / Ivy
package play.utils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.StringEscapeUtils;
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