37 |
* @author <a href='mailto:dog@gnu.org'>Chris Burdess</a> |
* @author <a href='mailto:dog@gnu.org'>Chris Burdess</a> |
38 |
* @version $Revision$ $Date$ |
* @version $Revision$ $Date$ |
39 |
*/ |
*/ |
40 |
public final class PostStream |
public final class PostStream extends FilterOutputStream |
|
extends FilterOutputStream |
|
41 |
{ |
{ |
42 |
|
|
43 |
NNTPConnection connection; |
NNTPConnection connection; |
44 |
boolean isTakethis; |
boolean isTakethis; |
45 |
|
|
46 |
PostStream(NNTPConnection connection, boolean isTakethis) |
PostStream(NNTPConnection connection, boolean isTakethis) |
47 |
{ |
{ |
48 |
super(connection.out); |
super(connection.out); |
49 |
this.connection = connection; |
this.connection = connection; |
50 |
this.isTakethis = isTakethis; |
this.isTakethis = isTakethis; |
51 |
} |
} |
54 |
* Close the stream. |
* Close the stream. |
55 |
* This calls NNTPConnection.postComplete(). |
* This calls NNTPConnection.postComplete(). |
56 |
*/ |
*/ |
57 |
public void close() |
public void close() throws IOException |
|
throws IOException |
|
58 |
{ |
{ |
59 |
super.close(); |
super.close(); |
60 |
if (isTakethis) |
if (isTakethis) |
62 |
else |
else |
63 |
connection.postComplete(); |
connection.postComplete(); |
64 |
} |
} |
65 |
|
|
66 |
} |
} |