+ new Thread(new Runnable() {
+ public void run() {
+ try {
+ int read;
+ final byte buffer[] = new byte[BLOCK_SIZE];
+ while ((read = in.read(buffer)) > 0)
+ {
+ pipe.write(buffer, 0, read);
+ pipe.flush();
+ }
+ } catch (IOException e) {}
+ try {
+ pipe.close();
+ } catch (IOException e) {}
+ }
+ }).start();