use of org.jline.terminal.TerminalBuilder in project jPOS by jpos.
the class CLI method buildTerminal.
private Terminal buildTerminal(InputStream in, OutputStream out) throws IOException {
TerminalBuilder builder = TerminalBuilder.builder();
builder.streams(in, out).system(System.in == in);
Terminal t = builder.build();
Attributes attr = t.getAttributes();
attr.getOutputFlags().addAll(EnumSet.of(Attributes.OutputFlag.ONLCR, Attributes.OutputFlag.OPOST));
t.setAttributes(attr);
return t;
}
Aggregations