Search in sources :

Example 1 with PropertiesReader

use of com.opensymphony.xwork2.util.PropertiesReader in project struts by apache.

the class LocatableProperties method load.

@Override
public void load(InputStream in) throws IOException {
    try (PropertiesReader pr = new PropertiesReader(new InputStreamReader(in))) {
        while (pr.nextProperty()) {
            String name = pr.getPropertyName();
            String val = pr.getPropertyValue();
            int line = pr.getLineNumber();
            String desc = convertCommentsToString(pr.getCommentLines());
            Location loc = new LocationImpl(desc, location.getURI(), line, 0);
            setProperty(name, val, loc);
        }
    }
}
Also used : InputStreamReader(java.io.InputStreamReader) PropertiesReader(com.opensymphony.xwork2.util.PropertiesReader)

Aggregations

PropertiesReader (com.opensymphony.xwork2.util.PropertiesReader)1 InputStreamReader (java.io.InputStreamReader)1