MCPcopy Create free account
hub / github.com/FongMi/TV / Asset

Class Asset

catvod/src/main/java/com/github/catvod/utils/Asset.java:7–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5import java.io.InputStream;
6
7public class Asset {
8
9 public static InputStream open(String fileName) {
10 try {
11 return Init.context().getAssets().open(fileName.replace("assets://", ""));
12 } catch (Exception e) {
13 return null;
14 }
15 }
16
17 public static String read(String fileName) {
18 try {
19 return Path.read(open(fileName));
20 } catch (Exception e) {
21 return "";
22 }
23 }
24}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected