Quote:
Originally Posted by d_a_parker
Hello!
Just a quick question, is it possible to get the length of a ByteBuffer? I thought maybe you could call ReadByte() in a loop with a counter until you reach the end of the buffer, but what exactly will happen when ReadByte() is called beyond the end?
Thanks!
|
All buffers have the same length, MAX_BUFFER_LENGTH, which defaults to 1024 bytes. You're responsible for keeping track of the maximum cursor position that holds any meaningful data.
__________________