hmmm what is wrong ????
package pl.codegym.task.task20.task2003;
import java.util.Map;
import java.util.HashMap;
import java.io.*;
import java.io.PrintWriter;
import java.util.Iterator;
/*
Wprowadzenie do properties
*/
public class Solution {
public static Map<String, String> properties = new HashMap<>();
public void fillInPropertiesMap() throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String fileName = reader.readLine();
FileInputStream fin= new FileInputStream(fileName);
load(fin);
reader.close();
File yourFile = File.createTempFile(fileName, null);
OutputStream outputStream = new FileOutputStream(yourFile);
save(outputStream);
}
public void save(OutputStream outputStream) throws Exception {
PrintWriter printWriter = new PrintWriter(outputStream);
Iterator<Map.Entry<String, String>> itr = properties.entrySet().iterator();
while(itr.hasNext())
{
Map.Entry<String, String> entry = itr.next();
printWriter.println(entry.getKey());
printWriter.println(entry.getValue());
}
}
public void load(InputStream inputStream) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
Map<String, String> prop = new HashMap<>();
String help; String help2;
while((help = reader.readLine()) != null)
{
help2 = reader.readLine();
properties.put(help,help2);
}
}
public static void main(String[] args) {
}
}