public boolean ready() throws IOException {synchronized (lock) {if (in == null) {throw new IOException("InputStreamReader is closed");}try {return bytes.hasRemaining() || in.available() > 0;} catch (IOException e) {return false;}}}

public override bool ready(){lock (@lock){if (@in == null){throw new System.IO.IOException("InputStreamReader is closed");}try{return bytes.hasRemaining() || @in.available() > 0;}catch (System.IO.IOException){return false;}}}
