out.close();
if ( out != null ) { out.close(); }
    static byte[] serialize( Object obj ) throws NamingException    {        ByteArrayOutputStream bytesOut = null;        ObjectOutputStream out = null;        try        {            bytesOut = new ByteArrayOutputStream();            out = new ObjectOutputStream( bytesOut );            out.writeObject( obj );            return bytesOut.toByteArray();        }        catch ( Exception e )        {            NamingException ne = new NamingException( "Serialization of '" + obj + "' failed:\n" + e.getMessage() );            ne.setRootCause( e );            throw ne;        }        finally        {            try            {                out.close();            }            catch ( IOException e )            {                throw new NamingException( "object serialization stream close() failure" );            }        }    }