aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes how to get this same output format in java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "how to get this same output format in java " Watch "how to get this same output format in java " New topic
Author

how to get this same output format in java

Muthu Kumaran Murugesan
Greenhorn

Joined: Jul 08, 2010
Posts: 2
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


Thanks & Regards
-
MK
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

I guess it's you asking the same question there. Please BeForthrightWhenCrossPostingToOtherSites.


[My Blog]
All roads lead to JavaRanch
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19670
    
  18

Isn't this essentially the same problem as this one?


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to get this same output format in java