Add finish() method to Connection.
[sonitus.git] / src / main / java / net / pterodactylus / sonitus / data / Connection.java
index b8bee32..762ba02 100644 (file)
@@ -82,4 +82,12 @@ public abstract class Connection implements Runnable {
         */
        protected abstract void feed(byte[] buffer) throws IOException;
 
+       /**
+        * Notifies the sink that the source does not deliver any more data.
+        *
+        * @throws IOException
+        *              if an I/O error occurs
+        */
+       protected abstract void finish() throws IOException;
+
 }