Is it possible to use struct-like constructs in Java?

前端 未结 8 1929
时光取名叫无心
时光取名叫无心 2020-12-30 11:15

I\'m considering using Java for a large project but I haven\'t been able to find anything that remotely represented structures in Java. I need to be able to convert network

8条回答
  •  伪装坚强ぢ
    2020-12-30 12:13

    As Joshua says, serialization is the typical way to do these kinds of things. However you there are other binary protocols like MessagePack, ProtocolBuffers, and AvRO.

    If you want to play with the bytecode structures, look at ASM and CGLIB; these are very common in Java applications.

提交回复
热议问题