private static final boolean isDestinationPrefixValid(String destinationPrefix)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "isDestinationPrefixValid", destinationPrefix);
        boolean isValid = true; // Assume the prefix is valid until we know otherwise.

        // null indicates that no destination prefix is being used.
        if (null != destinationPrefix)
        {
            // Check for the length first.
            int len = destinationPrefix.length();

            if (len > 24)
            {
                isValid = false;
            }
            else
            {
                // Cycle through each character in the prefix until we find an invalid character, 
                // or until we come to the end of the string.
                int along = 0;

                while ((along < len) && isValid)
                {
                    char c = destinationPrefix.charAt(along);
                    if (!(('A' <= c) && ('Z' >= c)))
                    {
                        if (!(('a' <= c) && ('z' >= c)))
                        {
                            if (!(('0' <= c) && ('9' >= c)))
                            {
                                if ('.' != c && '/' != c && '%' != c)
                                {
                                    // This character isn't a valid one...  
                                    isValid = false;
                                }
                            }
                        }
                    }
                    // Move along to the next character in the string.
                    along += 1;
                }
            }
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "isDestinationPrefixValid", Boolean.valueOf(isValid));
        return isValid;
    }
private static final boolean isDestinationPrefixValid ( String destinationPrefix ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "isDestinationPrefixValid" , destinationPrefix ) ; boolean isValid = true ; if ( null != destinationPrefix ) { int len = destinationPrefix . length ( ) ; if ( len > 24 ) { isValid = false ; } else { int along = 0 ; while ( ( along < len ) && isValid ) { char c = destinationPrefix . charAt ( along ) ; if ( ! ( ( 'A' <= c ) && ( 'Z' >= c ) ) ) { if ( ! ( ( 'a' <= c ) && ( 'z' >= c ) ) ) { if ( ! ( ( '0' <= c ) && ( '9' >= c ) ) ) { if ( '.' != c && '/' != c && '%' != c ) { isValid = false ; } } } } along += 1 ; } } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "isDestinationPrefixValid" , Boolean . valueOf ( isValid ) ) ; return isValid ; }
Determines whether a destination prefix for a System destination is valid or not.

<p>If the destination prefix has more than 24
characters, then it is invalid.
<p>The destination prefix is invalid if it contains any characters not in the following
list:
<ul>
<li>a-z (lower-case alphas)</li>
<li>A-Z (upper-case alphas)</li>
<li>0-9 (numerics)</li>
<li>. (period)</li>
<li>/ (slash)</li>
<li>% (percent)</li>
</ul>
<p>null and empty string values for a destination prefix are valid, and
simply indicate an empty prefix.

@param destinationPrefix The destination prefix to which the validity
check is applied.
@return true if the destination prefix is valid, false if the destination prefix is
invalid.