MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / loadLocaleData

Method loadLocaleData

src/main/java/net/optifine/Lang.java:75–96  ·  view source on GitHub ↗
(InputStream is, Map localeProperties)

Source from the content-addressed store, hash-verified

73 }
74
75 public static void loadLocaleData(InputStream is, Map localeProperties) throws IOException
76 {
77 Iterator iterator = IOUtils.readLines(is, Charsets.UTF_8).iterator();
78 is.close();
79
80 while (iterator.hasNext())
81 {
82 String s = (String)iterator.next();
83
84 if (!s.isEmpty() && s.charAt(0) != 35)
85 {
86 String[] astring = (String[])((String[])Iterables.toArray(splitter.split(s), String.class));
87
88 if (astring != null && astring.length == 2)
89 {
90 String s1 = astring[0];
91 String s2 = pattern.matcher(astring[1]).replaceAll("%$1s");
92 localeProperties.put(s1, s2);
93 }
94 }
95 }
96 }
97
98 public static String get(String key)
99 {

Callers 2

loadResourcesMethod · 0.95

Calls 9

readLinesMethod · 0.80
closeMethod · 0.65
putMethod · 0.65
iteratorMethod · 0.45
hasNextMethod · 0.45
nextMethod · 0.45
isEmptyMethod · 0.45
toArrayMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected