How to parse/encode binary message formats?

前端 未结 5 1544
天涯浪人
天涯浪人 2021-02-09 05:59

I need to parse and encode to a legacy binary message format in Java. I began by using DataOutputStream to read/write primitive types but the problem I\'m having is that the mes

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-09 06:23

    You need to apply bit arithmetics (AND, OR, AND NOT operators) to change or read single bits within a byte in Java. Arithmetic operators are &, | and ~

提交回复
热议问题