@@ -0,0 +1,1079 @@
+package com.bsuir.wtlab1.source.dao;%0A%0Aimport java.io.BufferedReader;%0Aimport java.io.File;%0Aimport java.io.FileReader;%0Aimport java.io.IOException;%0Aimport java.util.HashMap;%0A%0Apublic class FileDao %7B%0A%09%0A%09private final String dataSource = %22treasure.txt%22;%0A%09%0A%09/**%0A%09 * Read treasures from file.%0A%09 *%0A%09 * @return map treasures%0A%09 */%0A%09public HashMap%3CString, Long%3E getDate() %7B%0A%09%09HashMap%3CString, Long%3E result = new HashMap%3C%3E();%0A%09%09File file = new File(dataSource);%0A%09%09try %7B%0A%09%09%09BufferedReader in = new BufferedReader(new FileReader(file.getAbsoluteFile()));%0A%09%09%09try %7B%0A%09%09%09%09String lineFromFile;%0A%09%09%09%09while ((lineFromFile = in.readLine()) != null) %7B%0A%09%09%09%09%09String%5B%5D currentParam = lineFromFile.split(%22:%5B%5Ct %5D*%22);%0A%09%09%09%09%09if (currentParam.length %3C 2) %7B%0A%09%09%09%09%09%09throw new IOException(%22Error while parse string: %22 + lineFromFile);%0A%09%09%09%09%09%7D else %7B%0A%09%09%09%09%09%09result.put(currentParam%5B0%5D.trim(), Long.valueOf(currentParam%5B1%5D.trim()));%0A%09%09%09%09%09%7D%0A%09%09%09%09%7D%0A%09%09%09%7D finally %7B%0A%09%09%09%09in.close();%0A%09%09%09%7D%0A%09%09%7D catch (NumberFormatException e) %7B%0A%09%09%09e.printStackTrace();%0A%09%09%7D catch (IOException e) %7B%0A%09%09%09e.printStackTrace();%0A%09%09%7D%0A%09%09return result;%0A%09%7D%0A%7D%0A

Add dao