credential = ( ( String ) value ).getBytes();
credential = StringTools.getBytesUtf8( (String)value );
    public static byte[] getCredential( Hashtable env ) throws ConfigurationException    {        byte[] credential;        Object value = env.get( Context.SECURITY_CREDENTIALS );        if ( value == null )        {            credential = null;        }        else if ( value instanceof String )        {            credential = ( ( String ) value ).getBytes();        }        else if ( value instanceof byte[] )        {            credential = ( byte[] ) value;        }        else        {            throw new ConfigurationException( "Can't convert '" + Context.SECURITY_CREDENTIALS + "' to byte[]." );        }        if ( credential != null )        {            env.put( Context.SECURITY_CREDENTIALS, credential );        }        return credential;    }