Skip to content

Instantly share code, notes, and snippets.

@thermosym
Created March 9, 2014 13:31
Show Gist options
  • Save thermosym/9447765 to your computer and use it in GitHub Desktop.
Save thermosym/9447765 to your computer and use it in GitHub Desktop.
class PrintStream extends Thread
{
java.io.InputStream __is = null;
public PrintStream(java.io.InputStream is)
{
__is = is;
}
public void run()
{
try
{
while(this != null)
{
int _ch = __is.read();
if(_ch != -1)
System.out.print((char)_ch);
else break;
}
}
catch (Exception e)
{
e.printStackTrace();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment