public void run() {
        try {
            OutputStreamWriter os = new OutputStreamWriter(out);
            InputStreamReader ir = new InputStreamReader(System.in);

            
            char[] c = new char[4096];
            while ((ir.read(c)) != -1 && !Thread.interrupted()) {
                //for(int i=0; i< c.length;i++) System.out.print((int)c[i]+",");

                for(int i=0; (int)c[i]>0; i++)os.write(c[i]); 
           
               // os.write(c);
                os.flush(); 
                out.flush();
                Thread.sleep(10);
               // c[0]=0;
            }
            os.close();
            out.close();
            /*int n;
             ByteBuffer buffer = ByteBuffer.allocate(100);
             while ((n = in.read(buffer)) != -1) { 
             out.write(buffer.array(), 0, n);
             out.flush();
             }
             out.close();*/
        } catch (AsynchronousCloseException e) { 
            e.printStackTrace();
        } catch (IOException e) {
            System.out.println(e+" input");
        } catch (InterruptedException ex) {
            Logger.getLogger(InputCopier.class.getName()).log(Level.SEVERE, null, ex);
        }
    }