MCPcopy Create free account
hub / github.com/JetBrains/skija / readResource

Method readResource

shared/java/impl/Library.java:50–60  ·  view source on GitHub ↗
(String path)

Source from the content-addressed store, hash-verified

48 }
49
50 public static String readResource(String path) {
51 URL url = _nativeLibraryClass.getResource(path);
52 if (url == null)
53 return null;
54 try (InputStream is = url.openStream()) {
55 byte[] bytes = is.readAllBytes();
56 return new String(bytes).trim();
57 } catch (IOException e) {
58 return null;
59 }
60 }
61
62 public static synchronized void load() {
63 if (_loaded) return;

Callers 1

loadMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected