I don't think puting extends closeable in the socket class is incompatible... But any way i didn't mean overloading the class function, i meant my own utility function to close closeables in finally clauses.