refactoring ReadableByteBuffer