Java equivalent of Python's struct.pack?

后端 未结 4 1061
天涯浪人
天涯浪人 2020-12-10 11:43

Is there any function equivalent to Python\'s struct.pack in Java that allows me to pack and unpack values like this?

pump_on = struct.pack(\"II         


        
4条回答
  •  余生分开走
    2020-12-10 11:45

    I started development of project which is very close to Python Struct: java-binary-block-parser in JBBP it will look like

    JBBPOut.BeginBin().Int(0,0).Short(21,96).Int(512).End().toByteArray();
    

提交回复
热议问题