//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public SectionedCharBuffer read(SectionedCharBuffer buffer, int from) throws java.io.IOException
        public override SectionedCharBuffer Read(SectionedCharBuffer buffer, int from)
        {
            buffer.Compact(buffer, from);
            buffer.ReadFrom(_reader);
            _position += buffer.Available();
            return(buffer);
        }
        /// <summary>
        /// The one calling read doesn't actually read, since reading is up to the thread in here.
        /// Instead the caller just waits for this thread to have fully read the next buffer and
        /// flips over to that buffer, returning it.
        /// </summary>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public SectionedCharBuffer read(SectionedCharBuffer buffer, int from) throws java.io.IOException
        public override SectionedCharBuffer Read(SectionedCharBuffer buffer, int from)
        {
            WaitUntilReadAhead();

            // flip the buffers
            SectionedCharBuffer resultBuffer = _theOtherBuffer;

            buffer.Compact(resultBuffer, from);
            _theOtherBuffer = buffer;

            // make any change in source official
            if (!string.ReferenceEquals(_newSourceDescription, null))
            {
                _sourceDescription    = _newSourceDescription;
                _newSourceDescription = null;
            }

            PokeReader();
            return(resultBuffer);
        }