public static BiMap<Integer, String> commonStrings(int version) throws IOException {
        // load default strings from resource files if required
        if (!commonStringMap.containsKey(version)) {
            AtomicInteger index = new AtomicInteger(1 << 31);
            String resourcePath = "/resources/strings/" + version + ".x.txt";
            try (BufferedReader br = resourceReader(resourcePath)) {
                commonStringMap.put(version, br.lines().collect(Collectors.toMap(
                    value -> index.getAndAdd(value.length() + 1),
                    value -> value
                )));
            } catch (NullPointerException ex) {
                throw new RuntimeException("No common strings file found for version " + version);
            }
        }

        return HashBiMap.create(commonStringMap.get(version));
    }
@author Nico Bergemann <barracuda415 at yahoo.de>
disunity-core/src/main/java/info/ata4/junity/serialize/typetree/StringTable.java