mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 11:19:04 +01:00
Added finish() methods to transport readers/writers, and added a
readerFinished() callback method to FilePlugin.
This commit is contained in:
@@ -13,9 +13,14 @@ public interface BatchTransportReader {
|
||||
InputStream getInputStream();
|
||||
|
||||
/**
|
||||
* Closes the reader and disposes of any associated state. This method must
|
||||
* be called even if the reader is not used, or if an exception is thrown
|
||||
* while using the reader.
|
||||
* Finishes reading from the transport. This method should be called after
|
||||
* closing the input stream.
|
||||
*/
|
||||
void finish() throws IOException;
|
||||
|
||||
/**
|
||||
* Disposes of any associated state. This method must be called even if the
|
||||
* reader is not used, or if an exception is thrown while using the reader.
|
||||
*/
|
||||
void dispose() throws IOException;
|
||||
}
|
||||
|
||||
@@ -18,9 +18,15 @@ public interface StreamTransportConnection {
|
||||
OutputStream getOutputStream() throws IOException;
|
||||
|
||||
/**
|
||||
* Closes the connection and disposes of any associated state. This method
|
||||
* must be called even if the connection is not used, or if an exception
|
||||
* is thrown while using the connection.
|
||||
* Finishes using the transport. This method should be called after closing
|
||||
* the input and output streams.
|
||||
*/
|
||||
void finish() throws IOException;
|
||||
|
||||
/**
|
||||
* Disposes of any associated state. This method must be called even if the
|
||||
* connection is not used, or if an exception is thrown while using the
|
||||
* connection.
|
||||
*/
|
||||
void close() throws IOException;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user