我已经试过this short2byte and byte2short conversion, works fine but time consuming. 如下图所示 ByteBuffer.wrap(bData).order(ByteOrder.LITTLE_ENDIAN).asShortBuffer().get(sData);
在同样的方式我想转换回短字节我字节转换为短。 我已经搜索并看到
嗨,这个问题的答案解释:Eclipse bug? When is a short not a short? 这是不合法的方法隐式缩小int转换为短。这与在方法中的参数很短时将int作为参数传递有关。 但是看起来对于返回类型来说事情是不同的。 public short doStuff(){
System.out.println("ciao");
return 4;
}
即使将要在方法外部分