src/main/java/org/michailov/async/io/AsyncTextStreamWriter.java
public boolean isEmpty() {
        return  _stringRingBuffer.getAvailableToRead() == 0 
             && _asyncCharEncoder.getCharRingBuffer().getAvailableToRead() == 0
             && _asyncCharEncoder.getByteRingBuffer().getAvailableToRead() == 0;
    }
/**
     * Checks whether all the underlying ring buffers are empty.
     * This condition is important to check when {@link AsyncAgent#applyAsync} is used because
     * that method would return as soon as a set of lines is sent down to the {@link AsyncLineJoiner},
     * but there may be chars and bytes still in the pipeline. 
     * If you want to continue execution when all chars and bytes have been flushed to the OutputStream,
     * you may use this method in conjunction with {@link WhenReady#completeAsync}.
     * 
     * @return  true iff all of the underlying ring buffers are empty.
     */
Checks whether all the underlying ring buffers are empty.
This condition is important to check when  AsyncAgent#applyAsync is used because
that method would return as soon as a set of lines is sent down to the  AsyncLineJoiner,
but there may be chars and bytes still in the pipeline.
If you want to continue execution when all chars and bytes have been flushed to the OutputStream,
you may use this method in conjunction with  WhenReady#completeAsync.

@return  true iff all of the underlying ring buffers are empty.
Checks whether all the underlying ring buffers are empty . This condition is important to check when AsyncAgent#applyAsync is used because that method would return as soon as a set of lines is sent down to the AsyncLineJoiner but there may be chars and bytes still in the pipeline . If you want to continue execution when all chars and bytes have been flushed to the OutputStream you may use this method in conjunction with WhenReady#completeAsync . @return true iff all of the underlying ring buffers are empty .
public boolean isEmpty() {
        return  _stringRingBuffer.getAvailableToRead() == 0 
             && _asyncCharEncoder.getCharRingBuffer().getAvailableToRead() == 0
             && _asyncCharEncoder.getByteRingBuffer().getAvailableToRead() == 0;
    }
public boolean isEmpty ( ) { return _stringRingBuffer . getAvailableToRead ( ) == 0 && _asyncCharEncoder . getCharRingBuffer ( ) . getAvailableToRead ( ) == 0 && _asyncCharEncoder . getByteRingBuffer ( ) . getAvailableToRead ( ) == 0 ; }
Checks whether all the underlying ring buffers are empty.
Checks whether all the underlying ring buffers are empty .