Handling edge cases for Reader and Writer when content length is 0.