projects
/
sonitus.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rename exception variable.
[sonitus.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sonitus
/
data
/
Connection.java
diff --git
a/src/main/java/net/pterodactylus/sonitus/data/Connection.java
b/src/main/java/net/pterodactylus/sonitus/data/Connection.java
index
b8bee32
..
9377579
100644
(file)
--- a/
src/main/java/net/pterodactylus/sonitus/data/Connection.java
+++ b/
src/main/java/net/pterodactylus/sonitus/data/Connection.java
@@
-54,10
+54,15
@@
public abstract class Connection implements Runnable {
try {
byte[] buffer = source.get(bufferSize());
feed(buffer);
try {
byte[] buffer = source.get(bufferSize());
feed(buffer);
- } catch (IOException
e
) {
-
return
;
+ } catch (IOException
ioe1
) {
+
break
;
}
}
}
}
+ try {
+ finish();
+ } catch (IOException ioe1) {
+ /* well, what can we do? nothing. */
+ }
}
//
}
//
@@
-82,4
+87,12
@@
public abstract class Connection implements Runnable {
*/
protected abstract void feed(byte[] buffer) throws IOException;
*/
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;
+
}
}