rolling char buffer written with java provides two different implementation. one is RollingHeapCharBuffer based char array, another is RollingDirectCharBuffer based on OS native memory provided by java Unsafe API. more details show in the code.