File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to get this same output format in java

 
Muthu Kumaran Murugesan
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
pump_on = struct.pack("IIHHI", 0, 0, 21, 96, 512)
print pump_on
This is function in python used for packing values in specified format
the output for the above line
'\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00`\x00\x00\x02\x00\x00'

so how to get this output in java
is there any function like pack or
any way to get this out put


If any suggestions kindly advice me
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess it's you asking the same question there. Please BeForthrightWhenCrossPostingToOtherSites.
 
Rob Spoor
Sheriff
Pie
Posts: 20372
44
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Isn't this essentially the same problem as this one?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic