Fix comment.
[sonitus.git] / src / main / java / net / pterodactylus / sonitus / data / filter / ExternalFilter.java
index c2f6715..497ba2a 100644 (file)
@@ -57,6 +57,7 @@ public abstract class ExternalFilter implements Filter {
 
        //
        // FILTER METHODS
+       //
 
        @Override
        public Format format() {
@@ -67,6 +68,9 @@ public abstract class ExternalFilter implements Filter {
        public byte[] get(int bufferSize) throws EOFException, IOException {
                byte[] buffer = new byte[bufferSize];
                int read = pipedInputStream.read(buffer);
+               if (read == -1) {
+                       throw new EOFException();
+               }
                return Arrays.copyOf(buffer, read);
        }