I have a Java thread:
class MyThread extends Thread {
@Override
public void run() {
BufferedReader stdin =
new BufferedReader(new InputStream
My first reaction is that a thread and System.in really don't go together.
So first, split this so that the thread code does not touch any static including System.in.
A thread reads from InputStream and passes into a buffer. Pass an InputStream into your existing thread that reads from the buffer but also checks that you haven't aborted.