All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.unlaxer.jaddress.util.checker.SuffixCheckerResults Maven / Gradle / Ivy

The newest version!
package org.unlaxer.jaddress.util.checker;

import java.io.BufferedReader;
import java.io.FileReader;
import java.nio.charset.Charset;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;

import net.arnx.jsonic.JSON;



public class SuffixCheckerResults {
	private Path data = Path.of("src/main/resources/SuffixChecker.json");

	List list = new ArrayList<>();
	
	public boolean load() {
		try (BufferedReader bufferedReader = new BufferedReader(
				new FileReader(data.toFile(), Charset.forName("utf8")))) {
			String line;
			
			while ((line = bufferedReader.readLine()) != null) {
				list.add(JSON.decode(line, CheckData.class));
			}
		} catch (Exception e) {
			e.printStackTrace();
			return false;
		}
		return true;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy