开发者

How to read String in java that was written using python’s struct.pack method

out.write( struct.pack(">f", 1.1) );
out.write( struct.pack(">i", 12) );
out.write( struct.pack(">3s", "abc") );

how to import struct package in java it says ..

no package found when i am trying to 开发者_如何学Cexecute it

so kindly tell me any suggestions if any

Thanking you

i took that code from How to read String in java that was written using python's struct.pack method


Read the answer to the question you referenced. The sample code in the question was incorrect.

Also, you don't import the struct package in Java. It's a Python package. Also as described in the other question, you use java.io.DataInputStream to read the file created from Python.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜