mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Establish some rules for handling InputStreams
* Methods shouldn't place any special requirements on the streams passed into them * This implies that if a stream's going to be marked and reset, that should all happen within one method * This also implies that if a method needs to mark and reset a stream, it should wrap the stream in a BufferedInputStream before doing so, rather than requiring a markable stream to be passed in
This commit is contained in:
@@ -8,6 +8,7 @@ import org.briarproject.bramble.api.sync.GroupId;
|
||||
import org.briarproject.bramble.api.sync.MessageId;
|
||||
import org.briarproject.briar.api.conversation.ConversationManager.ConversationClient;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
@NotNullByDefault
|
||||
@@ -37,7 +38,7 @@ public interface MessagingManager extends ConversationClient {
|
||||
* Stores a local attachment message.
|
||||
*/
|
||||
AttachmentHeader addLocalAttachment(GroupId groupId, long timestamp,
|
||||
String contentType, InputStream is) throws DbException;
|
||||
String contentType, InputStream is) throws DbException, IOException;
|
||||
|
||||
/**
|
||||
* Returns the ID of the contact with the given private conversation.
|
||||
|
||||
Reference in New Issue
Block a user