Java equivalent of Python's “construct” library?

I don't understand phyton syntax but I see that the construct library you said is used to work with data structures. In java those different types of data structures are called collections. There are of many different types depending on the purpose.

I don't understand phyton syntax but I see that the construct library you said is used to work with data structures. In java those different types of data structures are called collections. There are of many different types depending on the purpose.

Here a couple of links that maybe can become handy: coderfriendly.com/2009/05/23/java-collec... download.oracle.com/javase/tutorial/coll....

1 Actually, it seems (I don't know the library either) we have a mild case of metaprogramming here - specifically, the creation of types at runtime. Good luck doing that in Java ;) – delnan Mar 6 at 16:19 1 This isn't what I want. You misunderstood the question.

@delnan It is indeed possible with Java. I could write something myself, but I was wondering is existing implementations exists. – someguy Mar 6 at 17:34.

You can use DataInput/DataOutput (and their implementations) to convert any set of values from/to a set of bytes. This doesn't give you an object where you can use names to access the individual fields, though - you would have to create such yourself. It depends a bit on what you want to do - do you have a fixed data format to send/receive on wire, or does this vary from time to time?

Not what I want. I want to do some declarative programming. For instance, several packets have this "message" block where I have to read the length, colour, font etc.. To reduce boilerplate code, I could declare a "message" structure and embed into the packets.

– someguy Mar 6 at 17:32.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions