src/main/java/org/michailov/async/io/AsyncLineJoiner.java
private void writeCurrentLineChars() {
        while (_charRingBuffer.getAvailableToWrite() > 0) {
            if (_lineCharIndex > NEGATIVE && _lineCharIndex < _currentLine.length()) {
                char ch = _currentLine.charAt(_lineCharIndex++);
                _charRingBuffer.write(ch);
            }
            else if (_breakCharIndex < _lineBreak.length()) { 
                char ch = _lineBreak.charAt(_breakCharIndex++);
                _charRingBuffer.write(ch);
            }
            else {
                // No line in progress.
                _lineCharIndex = NEGATIVE;
                _breakCharIndex = NEGATIVE;
                break;
            }
        }
    }
/**
     * Copies the chars of the current line plus a trailing EOL mark to the output char ring buffer.
     */
Copies the chars of the current line plus a trailing EOL mark to the output char ring buffer.
Copies the chars of the current line plus a trailing EOL mark to the output char ring buffer .
private void writeCurrentLineChars() {
        while (_charRingBuffer.getAvailableToWrite() > 0) {
            if (_lineCharIndex > NEGATIVE && _lineCharIndex < _currentLine.length()) {
                char ch = _currentLine.charAt(_lineCharIndex++);
                _charRingBuffer.write(ch);
            }
            else if (_breakCharIndex < _lineBreak.length()) { 
                char ch = _lineBreak.charAt(_breakCharIndex++);
                _charRingBuffer.write(ch);
            }
            else {
                _lineCharIndex = NEGATIVE;
                _breakCharIndex = NEGATIVE;
                break;
            }
        }
    }
private void writeCurrentLineChars ( ) { while ( _charRingBuffer . getAvailableToWrite ( ) > 0 ) { if ( _lineCharIndex > NEGATIVE && _lineCharIndex < _currentLine . length ( ) ) { char ch = _currentLine . charAt ( _lineCharIndex ++ ) ; _charRingBuffer . write ( ch ) ; } else if ( _breakCharIndex < _lineBreak . length ( ) ) { char ch = _lineBreak . charAt ( _breakCharIndex ++ ) ; _charRingBuffer . write ( ch ) ; } else { _lineCharIndex = NEGATIVE ; _breakCharIndex = NEGATIVE ; break ; } } }
Copies the chars of the current line plus a trailing EOL mark to the output char ring buffer.
Copies the chars of the current line plus a trailing EOL mark to the output char ring buffer .
// No line in progress.
