ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

You can read up more on Channel Buffer accessors here and about creating channel buffers here

Depending on your code, there might be more efficient methods of initializing the channel buffer. If your byte[] array is already prepared, you could do something as simple as:

ChannelBuffer buffer = ChannelBuffers.copiedBuffer(byte_array);

ChannelBuffer is not an internal class. rosjava maintainers should be able to answer better as to why byte arrays were changed to this.