KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > Ostermiller > util > NoCloseStream


1 /*
2  * Streams that have a different close mechanism.
3  * Copyright (C) 2003 Stephen Ostermiller
4  * http://ostermiller.org/contact.pl?regarding=Java+Utilities
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * See COPYING.TXT for details.
17  */

18 package com.Ostermiller.util;
19
20 import java.io.*;
21
22 /**
23  * A wrapper for a stream (either input or output)
24  * which has a close method with no effect.
25  * More information about this class is available from <a target="_top" HREF=
26  * "http://ostermiller.org/utils/NoCloseStream.html">ostermiller.org</a>.
27  *
28  * @author Stephen Ostermiller http://ostermiller.org/contact.pl?regarding=Java+Utilities
29  * @since ostermillerutils 1.01.00
30  */

31 public interface NoCloseStream {
32
33     /**
34      * Actually closes this stream and releases any system
35      * resources associated with the stream, as opposed to
36      * the close() method, which does nothing.
37      *
38      * @throws IOException if an I/O error occurs.
39      *
40      * @since ostermillerutils 1.01.00
41      */

42     public void reallyClose() throws IOException;
43
44 }
45
Popular Tags