mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 19:29:06 +01:00
Merged transports' finish() and dispose() methods.
This commit is contained in:
@@ -13,14 +13,8 @@ public interface BatchTransportReader {
|
||||
InputStream getInputStream();
|
||||
|
||||
/**
|
||||
* Finishes reading from the transport. This method should be called after
|
||||
* closing the input stream.
|
||||
* Closes the reader and disposes of any associated state. The argument
|
||||
* should be false if an exception was thrown while using the reader.
|
||||
*/
|
||||
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;
|
||||
void dispose(boolean success) throws IOException;
|
||||
}
|
||||
|
||||
@@ -16,14 +16,8 @@ public interface BatchTransportWriter {
|
||||
OutputStream getOutputStream();
|
||||
|
||||
/**
|
||||
* Finishes writing to the transport. This method should be called after
|
||||
* flushing and closing the output stream.
|
||||
* Closes the writer and disposes of any associated state. The argument
|
||||
* should be false if an exception was thrown while using the writer.
|
||||
*/
|
||||
void finish() throws IOException;
|
||||
|
||||
/**
|
||||
* Disposes of any associated state. This method must be called even if the
|
||||
* writer is not used, or if an exception is thrown while using the writer.
|
||||
*/
|
||||
void dispose() throws IOException;
|
||||
void dispose(boolean success) throws IOException;
|
||||
}
|
||||
|
||||
@@ -18,15 +18,8 @@ public interface StreamTransportConnection {
|
||||
OutputStream getOutputStream() throws IOException;
|
||||
|
||||
/**
|
||||
* Finishes using the transport. This method should be called after closing
|
||||
* the input and output streams.
|
||||
* Closes the connection and disposes of any associated state. The argument
|
||||
* should be false if an exception was thrown while using the connection.
|
||||
*/
|
||||
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 dispose() throws IOException;
|
||||
void dispose(boolean success) throws IOException;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user