在Swift>中是否存在等效的Java代码? 3?
int i = LibUtils.StreamReadInt(is);
byte[] aa = new byte[i];
is.read(aa, 0, i);
这里,StreamReadInt
的代码是
public static int StreamReadInt(InputStream st) {
int i = 0;
try {
DataInputStream ds = new DataInputStream(st);
i = ds.readInt();
} catch (IOException e) {
e.printStackTrace();
}
return i;
}