public void stopInput() { stopIn = true; try { inputOutput.getIn().close(); } catch (IOException ex) { Exceptions.printStackTrace(ex); } }
public void run() { Reader in = inputOutput.getIn(); try { while (true) { int read = in.read(); if (read != -1) { str.write(read); str.flush(); } else { str.close(); return; } if (stopIn) { return; } } } catch (IOException ex) { ex.printStackTrace(); } finally { try { str.close(); } catch (IOException ex) { ex.printStackTrace(); } } } }
try { io.getOut().reset(); io.getIn().reset(); } catch (IOException ex) { ex.printStackTrace();