MCPcopy Create free account
hub / github.com/BombusMod/BombusMod / readIntArray

Method readIntArray

src/main/java/util/ArrayLoader.java:52–67  ·  view source on GitHub ↗
(String name)

Source from the content-addressed store, hash-verified

50 public ArrayLoader() {
51 }
52 public int[] readIntArray(String name) {
53 try {
54 InputStream in = StaticData.getInstance().getAssetsLoader().getResourceAsStream(name);
55 DataInputStream is=new DataInputStream(in);
56 int len=is.readInt();
57 int[] arrayInt=new int[len];
58
59 for (int i=0; i<len;i++) {
60 arrayInt[i]=is.readInt();
61 }
62 return arrayInt;
63 } catch (Exception ex) {
64 }
65
66 return null;
67 }
68
69 public short[] readShortArray(String name) {
70 try {

Callers

nothing calls this directly

Calls 3

getInstanceMethod · 0.95
getAssetsLoaderMethod · 0.80
getResourceAsStreamMethod · 0.65

Tested by

no test coverage detected