APIdia Launch Partner
Top Description Fields Constructors Methods
jdk.internal.org.jline.reader

public Class PrintAboveWriter

extends StringWriter
Class Inheritance
Imports
java.io.StringWriter, .Writer

Redirects a Writer to a LineReader's LineReader#printAbove(String) method, which draws output above the current prompt / input line.

Example:

    LineReader reader = LineReaderBuilder.builder().terminal(terminal).parser(parser).build();
    PrintAboveWriter printAbove = new PrintAboveWriter(reader);
    printAbove.write(new char[] { 'h', 'i', '!', '\n'});

Field Summary

Modifier and TypeField and Description
private final LineReader

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
flush()

Overrides java.io.StringWriter.flush.

Implements java.io.Flushable.flush.

Flush the stream.

Inherited from java.io.StringWriter:
appendappendappendclosegetBuffertoStringwritewritewritewrite

Field Detail

readerback to summary
private final LineReader reader

Constructor Detail

PrintAboveWriterback to summary
public PrintAboveWriter(LineReader reader)

Method Detail

flushback to summary
public void flush()

Overrides java.io.StringWriter.flush.

Implements java.io.Flushable.flush.

Doc from java.io.StringWriter.flush.

Flush the stream.

The flush method of StringWriter does nothing.

Annotations
@Override