Skip to content

Commit 85c5a91

Browse files
authored
Merge pull request #1 from ashleyfrieze/ashleyfrieze-autocloseable
Make the `StreamGenerator` an `AutoCloseable`
2 parents acd2178 + 43b539f commit 85c5a91

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎pg/src/main/java/org/bouncycastle/openpgp/StreamGenerator.java‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44

55
/**
66
* Callback interface for generators that produce a stream to be informed when the stream has been
7-
* closed by the client.
7+
* closed by the client. Complies with Java's own {@link AutoCloseable} interface
88
*/
9-
interface StreamGenerator
9+
interface StreamGenerator extends AutoCloseable
1010
{
1111
/**
1212
* Signal that the stream has been closed.
1313
*/
14+
@Override
1415
void close()
1516
throws IOException;
1617
}

0 commit comments

Comments
 (0)