private void tryToReadDataFromPreviousVersions() {
boolean oldDataRead = false;
try {
File nodeFile = new File(Settings.getUserSettingsDirName(), "java.reminderplugin.ReminderPlugin.node");
if (nodeFile.exists()) {
StreamUtilities.objectInputStream(nodeFile, 0x4000, new ObjectInputStreamProcessor() {
@Override
public void process(ObjectInputStream inputStream) throws IOException {
try {
readReminderFromTVBrowser21and20(inputStream);
} catch (ClassNotFoundException e) {
mLog.log(Level.WARNING, "Could not read data from previous version", e);
}
}
});
oldDataRead = true;
nodeFile.delete();
}
File datFile = new File(Settings.getUserSettingsDirName(), "java.reminderplugin.ReminderPlugin.dat");
if (datFile.exists()) {
if (!oldDataRead) {
StreamUtilities.objectInputStream(datFile, 0x4000, new ObjectInputStreamProcessor() {
@Override
public void process(ObjectInputStream inputStream) throws IOException {
try {
readReminderFromBeforeTVBrowser20(inputStream);