What is the best resizable circular byte buffer available in Java?
Posted
by Wouter Lievens
on Stack Overflow
See other posts from Stack Overflow
or by Wouter Lievens
Published on 2008-11-28T12:00:21Z
Indexed on
2010/04/12
0:23 UTC
Read the original article
Hit count: 718
I need a byte buffer class in Java for single-threaded use. I should be able to insert data at the back of the buffer and read data at the front, with an amortized cost of O(1). The buffer should resize when it's full, rather than throw an exception or something.
I could write one myself, but I'd be very surprised if this didn't exist yet in a standard Java package, and if it doesn't, I'd expect it to exist in some well-tested public library.
What would you recommend?
© Stack Overflow or respective owner