更新时间:2022-06-23 05:32:26
我想你可能会追求的是 ByteBuffer :
I think what you may be after is a ByteBuffer:
ByteBuffer pump_on_buf = ...
pump_on_buf.putInt(0);
pump_on_buf.putInt(0);
pump_on_buf.putShort(21);
pump_on_buf.putShort(96);
pump_on_buf.putInt(512);
byte[] pump_on = pump_on_buf.array();