title: How to do autocomplete telnet of input in java using raw sockets
body: <p>I am using a general purpose apache commons library to do the boring networking management so the user can telnet in and start typing in commands to my java command processor. Currently it does not offer stuff like autocomplete of the current token or history which i would like to add.</p>
  
  <p>I know i can watch character by character but i am unsure how to erase and reprint the current line being entered with my new "auto completed line" etc. </p>
  
  <p>Any tips in the general direction would be appreciated.. :)</p>