Discards the bytes between the 0th index and {@code readerIndex}. It moves the bytes between {@code readerIndex} and {@code writerIndex} tothe 0th index, and sets {@code readerIndex} and {@code writerIndex} to{@code 0} and {@code oldWriterIndex - oldReaderIndex} respectively.
Please refer to the class documentation for more detailed explanation.