mirror of https://github.com/rusefi/rusefi.git
auto-sync
This commit is contained in:
parent
e3ab55dc65
commit
d09f85b1e8
|
@ -2,7 +2,6 @@ package com.rusefi.ui.storage;
|
||||||
|
|
||||||
import com.irnems.FileLog;
|
import com.irnems.FileLog;
|
||||||
|
|
||||||
import javax.swing.*;
|
|
||||||
import java.beans.XMLDecoder;
|
import java.beans.XMLDecoder;
|
||||||
import java.beans.XMLEncoder;
|
import java.beans.XMLEncoder;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
@ -19,6 +18,7 @@ public class PersistentConfiguration {
|
||||||
return INSTANCE;
|
return INSTANCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
public void load() {
|
public void load() {
|
||||||
try {
|
try {
|
||||||
XMLDecoder e = new XMLDecoder(new BufferedInputStream(new FileInputStream(CONFIG_FILE_NAME)));
|
XMLDecoder e = new XMLDecoder(new BufferedInputStream(new FileInputStream(CONFIG_FILE_NAME)));
|
||||||
|
@ -30,9 +30,8 @@ public class PersistentConfiguration {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void save() {
|
public void save() {
|
||||||
XMLEncoder e = null;
|
|
||||||
try {
|
try {
|
||||||
e = new XMLEncoder(new BufferedOutputStream(new FileOutputStream(CONFIG_FILE_NAME)));
|
XMLEncoder e = new XMLEncoder(new BufferedOutputStream(new FileOutputStream(CONFIG_FILE_NAME)));
|
||||||
e.writeObject(config);
|
e.writeObject(config);
|
||||||
e.close();
|
e.close();
|
||||||
System.out.println("Saved to " + CONFIG_FILE_NAME);
|
System.out.println("Saved to " + CONFIG_FILE_NAME);
|
||||||
|
|
Loading…
Reference in New Issue