title: Using a circular/ring buffer in Android
body: <p>I have been searching online for some time and I cant find any information about circular / ring buffers for Android.
  I tried to use the <code>ByteBuffer</code> but it is not doing what I want.</p>
  
  <p>I would like o have a simple circular buffer, that have start and end pointer, all this automatic and overwrites old data, It would be perfect if it could be a String buffer as I need to save actually messages similar to:</p>
  
  <p><code>"$messageA#"</code></p>
  
  <p><code>"$messageB#"</code></p>
  
  <p><code>"$messageC#"</code></p>
  
  <p><code>"$messageD#"</code></p>
  
  <p>Any idea?
  Thanks!</p>