From d8afc9f5c2aa97a96ca326c0178a7fc9577afaaf Mon Sep 17 00:00:00 2001 From: Przemyslaw Date: Mon, 1 Apr 2024 09:02:22 +0200 Subject: Init --- src/MyResource.java | 132 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 src/MyResource.java (limited to 'src/MyResource.java') diff --git a/src/MyResource.java b/src/MyResource.java new file mode 100644 index 0000000..0ec1aac --- /dev/null +++ b/src/MyResource.java @@ -0,0 +1,132 @@ +/* + Nie mieszac z java.awt.* (!!!) +*/ +package src; + +import java.io.IOException; +import java.io.InputStream; +import java.io.PrintStream; +import java.io.BufferedReader; +import java.io.InputStreamReader; + +import java.util.*; +import java.lang.*; + + +class MyResource { + final int MAX_WORDS=67656; + + public void MyResource() + { + } + private static final String absName = "/slownik.txt"; + // TODO - to jest mniej eleganckie; + static ArrayList directory3 = new ArrayList(); + static ArrayList directory4 = new ArrayList(); + static ArrayList directory5 = new ArrayList(); + static ArrayList directory6 = new ArrayList(); + static ArrayList directory7 = new ArrayList(); + static ArrayList directory8 = new ArrayList(); + static ArrayList directory9 = new ArrayList(); + static ArrayList directory10 = new ArrayList(); + static ArrayList directory11 = new ArrayList(); + static ArrayList directory12 = new ArrayList(); + static ArrayList directory13 = new ArrayList(); + static ArrayList directory14 = new ArrayList(); + //static int mem=0; + + public void read() throws Exception{ + String list; + + try { + InputStream is = this.getClass().getResourceAsStream(absName); + BufferedReader br=new BufferedReader(new InputStreamReader(is, "utf-8")); + for (int i=0; i