3

I am trying to write a byte array that I know the size of to the array however I am not able to parse the resultant data.

I am using the following code:

okAppender.writeBytes(b -> b.write(byteData));

and

byte[] byteData = new byte[500];
okTailer.readBytes(b -> b.read(byteData));

I expect there is padding but I do not know how much. Any insight would be appreciated.

user
  • 158
  • 6
  • 19

1 Answers1

3

I suggest you use the chronicle Bytes class ( which can wrap a bytebufffer ) as reading into a byte[] creates and object each time.

Rob Austin
  • 620
  • 3
  • 5