jline

Class UnixTerminal.ReplayPrefixOneCharInputStream

static class UnixTerminal.ReplayPrefixOneCharInputStream extends InputStream

This is awkward and inefficient, but probably the minimal way to add UTF-8 support to JLine

Author: Marc Herbert

Constructor Summary
ReplayPrefixOneCharInputStream(String encoding)
Method Summary
intavailable()
InputStreamReader is greedy and will try to read bytes in advance.
intread()
voidsetInput(int recorded, InputStream wrapped)
voidsetInputUTF8(int recorded, InputStream wrapped)

Constructor Detail

ReplayPrefixOneCharInputStream

public ReplayPrefixOneCharInputStream(String encoding)

Method Detail

available

public int available()
InputStreamReader is greedy and will try to read bytes in advance. We do NOT want this to happen since we use a temporary/"losing bytes" InputStreamReader above, that's why we hide the real wrappedStream.available() here.

read

public int read()

setInput

public void setInput(int recorded, InputStream wrapped)

setInputUTF8

public void setInputUTF8(int recorded, InputStream wrapped)
Copyright © 2002-2010 null. All Rights Reserved.