dap4/d4servlet/src/main/java/dap4/servlet/URLMapDefault.java
public void load(String filepath)
            throws IOException
    {
        String[] lines;
        try (InputStream is = new FileInputStream(filepath);) {
            String content = DapUtil.readtextfile(is);
            lines = content.split("[\n]");
        }
        for(String line : lines) {
            String[] pieces = line.split("[=]");
            if(pieces.length != 2)
                throw new IOException("File: " + filepath + "; malformed line: " + line);
            addEntry(pieces[0], pieces[1]);
        }
    }
public void load(String filepath)
            throws IOException
    {
        String[] lines;
        try (InputStream is = new FileInputStream(filepath);) {
            String content = DapUtil.readtextfile(is);
            lines = content.split("[\n]");
        }
        for(String line : lines) {
            String[] pieces = line.split("[=]");
            if(pieces.length != 2)
                throw new IOException("File: " + filepath + "; malformed line: " + line);
            addEntry(pieces[0], pieces[1]);
        }
    }
public void load ( String filepath ) throws IOException { String [ ] lines ; try ( InputStream is = new FileInputStream ( filepath ) ; ) { String content = DapUtil . readtextfile ( is ) ; lines = content . split ( "[\n]" ) ; } for ( String line : lines ) { String [ ] pieces = line . split ( "[=]" ) ; if ( pieces . length != 2 ) throw new IOException ( "File: " + filepath + "; malformed line: " + line ) ; addEntry ( pieces [ 0 ] , pieces [ 1 ] ) ; } }
File loader
File loader