public static GroupGrantee parseGroupGrantee(String groupUri) {
        for (GroupGrantee grantee : GroupGrantee.values()) {
            if (grantee.groupUri.equals(groupUri)) {
                return grantee;
            }
        }
     
        return null;
    }
Gets the {@link GroupGrantee} enumeration value
with the specified Amazon S3 group URI (eg.
http://acs.amazonaws.com/groups/global/AllUsers).
Returns <code>null</code> if an invalid
Amazon S3 group URI is specified.

@param groupUri
           A string representation of an Amazon S3 group URI (eg.
           http://acs.amazonaws.com/groups/global/AllUsers)

@return The {@link GroupGrantee} object represented by the given Amazon S3 group
        URI string. Returns <code>null</code>
        if the string isn't a valid Amazon S3 group
        URI.
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/GroupGrantee.java