Closeable and Socket, ZipFile
Pascal S. de Kloe
pascal at quies.net
Fri Jul 6 13:13:58 UTC 2007
On Friday 06 July 2007 02:02:21 Andreas Sterbenz wrote:
> Hi,
>
> elsewhere it came up that the java.io.Closeable interface is
> implemented by InputStream, OutputStream, Reader, Writer,
> SocketChannel, etc. but not by classes such as Socket, ServerSocket,
> ZipFile, etc.
>
> Is that intentional or a bug?
>
> Andreas.
A bug means that the software does not work as intended.
Socket, ServerSocket and ZipFile all have a close() method which closes
the respective streams so what's the problem?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 827 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.openjdk.java.net/pipermail/core-libs-dev/attachments/20070706/6d01da89/signature.asc>
More information about the core-libs-dev
mailing list