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

Method readByteArray

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

Source from the content-addressed store, hash-verified

82 return null;
83 }
84 public byte[] readByteArray(String name) {
85 try {
86 InputStream in = StaticData.getInstance().getAssetsLoader().getResourceAsStream(name);
87 DataInputStream is=new DataInputStream(in);
88 int len=is.readInt();
89 byte[] arrayByte=new byte[len];
90
91 is.read(arrayByte, 0, len);
92 return arrayByte;
93 } catch (Exception ex) { }
94
95 return null;
96 }
97
98/*
99 public static void writeIntArray(String name, int[] intArray) {

Callers

nothing calls this directly

Calls 4

getInstanceMethod · 0.95
getAssetsLoaderMethod · 0.80
getResourceAsStreamMethod · 0.65
readMethod · 0.45

Tested by

no test coverage detected