mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 03:39:05 +01:00
Removed Writer.close().
This commit is contained in:
@@ -84,7 +84,8 @@ class BundleWriterImpl implements BundleWriter {
|
||||
}
|
||||
if(state != State.MORE_BATCHES) throw new IllegalStateException();
|
||||
writer.writeListEnd();
|
||||
writer.close();
|
||||
out.flush();
|
||||
out.close();
|
||||
state = State.END;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,6 @@ class MessageEncoderImpl implements MessageEncoder {
|
||||
// Write the signature
|
||||
w.writeRaw(sig);
|
||||
byte[] raw = out.toByteArray();
|
||||
w.close();
|
||||
// The message ID is the hash of the entire message
|
||||
messageDigest.reset();
|
||||
messageDigest.update(raw);
|
||||
@@ -62,7 +61,6 @@ class MessageEncoderImpl implements MessageEncoder {
|
||||
w = writerFactory.createWriter(out);
|
||||
w.writeString(nick);
|
||||
w.writeRaw(keyPair.getPublic().getEncoded());
|
||||
w.close();
|
||||
messageDigest.reset();
|
||||
messageDigest.update(out.toByteArray());
|
||||
AuthorId authorId = new AuthorId(messageDigest.digest());
|
||||
|
||||
@@ -25,11 +25,6 @@ class WriterImpl implements Writer {
|
||||
return bytesWritten;
|
||||
}
|
||||
|
||||
public void close() throws IOException {
|
||||
out.flush();
|
||||
out.close();
|
||||
}
|
||||
|
||||
public void writeBoolean(boolean b) throws IOException {
|
||||
if(b) out.write(Tag.TRUE);
|
||||
else out.write(Tag.FALSE);
|
||||
|
||||
Reference in New Issue
Block a user