diff --git a/src/main/java/ctbrec/DevNull.java b/src/main/java/ctbrec/DevNull.java new file mode 100644 index 00000000..11a79e1f --- /dev/null +++ b/src/main/java/ctbrec/DevNull.java @@ -0,0 +1,18 @@ +package ctbrec; + +import java.io.IOException; +import java.io.OutputStream; + +public class DevNull extends OutputStream { + @Override + public void write(int b) throws IOException { + } + + @Override + public void write(byte[] b) throws IOException { + } + + @Override + public void write(byte[] b, int off, int len) throws IOException { + } +} diff --git a/src/main/java/ctbrec/ui/Player.java b/src/main/java/ctbrec/ui/Player.java index 8bcf772b..7cd2088d 100644 --- a/src/main/java/ctbrec/ui/Player.java +++ b/src/main/java/ctbrec/ui/Player.java @@ -1,13 +1,12 @@ package ctbrec.ui; import java.io.File; -import java.io.IOException; -import java.io.OutputStream; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import ctbrec.Config; +import ctbrec.DevNull; import ctbrec.Recording; import ctbrec.recorder.OS; import ctbrec.recorder.StreamRedirectThread; @@ -48,6 +47,7 @@ public class Player { } } + private static class PlayerThread extends Thread { private boolean running = false; private Process playerProcess; @@ -113,18 +113,4 @@ public class Player { } } } - - private static class DevNull extends OutputStream { - @Override - public void write(int b) throws IOException { - } - - @Override - public void write(byte[] b) throws IOException { - } - - @Override - public void write(byte[] b, int off, int len) throws IOException { - } - } -} \ No newline at end of file +}