mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 08:14:09 -08:00
Fix ClassLoader.getResourceAsStream
This commit is contained in:
parent
0419867497
commit
8256302c03
|
@ -50,11 +50,14 @@ public abstract class TClassLoader extends TObject {
|
|||
}
|
||||
JSObject data = resources.getResource(name);
|
||||
String dataString = resourceToString(data);
|
||||
if (dataString == null) {
|
||||
return null;
|
||||
}
|
||||
byte[] bytes = new byte[dataString.length()];
|
||||
for (int i = 0; i < bytes.length; ++i) {
|
||||
bytes[i] = (byte) dataString.charAt(i);
|
||||
}
|
||||
return dataString == null ? null : new ByteArrayInputStream(Base64Impl.decode(bytes));
|
||||
return new ByteArrayInputStream(Base64Impl.decode(bytes));
|
||||
}
|
||||
|
||||
public static InputStream getSystemResourceAsStream(String name) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user