- writeThread = new Thread(new Runnable() {
- public void run() {
- int read;
- try {
- while ((read = pipe.read(buffer)) > 0)
- {
- out.write(buffer, 0, read);
- out.flush();
- }
- } catch (IOException e) {
- System.out.println("Error writing to file " + e);
+ writeThread = new Thread(() -> {
+ int read;
+ try {
+ while ((read = pipe.read(buffer)) > 0)
+ {
+ out.write(buffer, 0, read);
+ out.flush();