Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within I/O and Streams
Search Coderanch
Advance search
Google search
Register / Login
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Paul Clapham
Ron McLeod
Jeanne Boyarsky
Tim Cooke
Sheriffs:
Liutauras Vilda
paul wheaton
Henry Wong
Saloon Keepers:
Tim Moores
Tim Holloway
Stephan van Hulst
Carey Brown
Frits Walraven
Bartenders:
Piet Souris
Himai Minh
Forum:
I/O and Streams
Python's struct.pack in Java
thiruvadi esakki
Greenhorn
Posts: 1
posted 11 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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("IIHHI", 0, 0, 21, 96, 512)
Ulf Dittmer
Rancher
Posts: 43027
76
posted 11 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Same question as
https://coderanch.com/t/502130/java/java/same-output-format-java
, closing this one.
If you have two accounts, let us now which one you want to keep so that we can close the other one.
I will suppress my every urge. But not this shameless plug:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
JPython - what is it exactly?
Jython with JDK1.5
repr() equivalent?
CRC16 with Polynominal : 0x8408, and Preset CRC : 0x6363
Why Java at all?
More...