@@ -0,0 +1,2885 @@
+package org.dbflute.intro.app.model.document.decoment;%0A%0Aimport java.io.InputStream;%0Aimport java.io.OutputStream;%0Aimport java.util.Map;%0A%0Aimport org.dbflute.exception.DfPropFileReadFailureException;%0Aimport org.dbflute.helper.mapstring.MapListFile;%0Aimport org.dbflute.helper.message.ExceptionMessageBuilder;%0A%0A/**%0A * @author yuto.eguma%0A */%0Apublic class DecoMapFile %7B%0A%0A    // ===================================================================================%0A    //                                                                                Read%0A    //                                                                                ====%0A    public Map%3CString, Object%3E readMap(InputStream ins) %7B%0A        final MapListFile mapListFile = createMapListFile();%0A        try %7B%0A            return mapListFile.readMap(ins);%0A        %7D catch (Exception e) %7B%0A            throwDecoMapReadFailureException(ins, e);%0A            return null; // unreachable%0A        %7D%0A    %7D%0A%0A    protected void throwDecoMapReadFailureException(InputStream ins, Exception e) %7B%0A        final ExceptionMessageBuilder br = new ExceptionMessageBuilder();%0A        br.addNotice(%22Failed to read the deco-map file.%22);%0A        br.addItem(%22Advice%22);%0A        br.addElement(%22Make sure the map-string is correct in the file.%22);%0A        br.addElement(%22For example, the number of start and end braces are the same.%22);%0A        br.addItem(%22Decoment Map%22);%0A        br.addElement(ins);%0A        final String msg = br.buildExceptionMessage();%0A        throw new DfPropFileReadFailureException(msg, e);%0A    %7D%0A%0A    // ===================================================================================%0A    //                                                                               Write%0A    //                                                                               =====%0A    public void writeMap(OutputStream ous, Map%3CString, Object%3E map) %7B%0A        final MapListFile mapListFile = createMapListFile();%0A        try %7B%0A            mapListFile.writeMap(ous, map);%0A        %7D catch (Exception e) %7B%0A            throwDecoMapWriteFailureException(ous, e);%0A        %7D%0A    %7D%0A%0A    protected void throwDecoMapWriteFailureException(OutputStream ous, Exception e) %7B%0A        final ExceptionMessageBuilder br = new ExceptionMessageBuilder();%0A        br.addNotice(%22Failed to write the deco-map file.%22);%0A        br.addItem(%22Decoment Map%22);%0A        br.addElement(ous);%0A        final String msg = br.buildExceptionMessage();%0A        throw new DfPropFileReadFailureException(msg, e);%0A    %7D%0A%0A    // ===================================================================================%0A    //                                                                        MapList File%0A    //                                                                        ============%0A    protected MapListFile createMapListFile() %7B%0A        return new MapListFile();%0A    %7D%0A%7D%0A

create decoMapFile.java