code: protected XmlWriter convertToXml(Grantee grantee, XmlWriter xml) throws SdkClientException {
          if (grantee instanceof CanonicalGrantee) {
              return convertToXml((CanonicalGrantee)grantee, xml);
          } else if (grantee instanceof EmailAddressGrantee) {
              return convertToXml((EmailAddressGrantee)grantee, xml);
          } else if (grantee instanceof GroupGrantee) {
              return convertToXml((GroupGrantee)grantee, xml);
          } else {
              throw new SdkClientException("Unknown Grantee type: " + grantee.getClass().getName());
          }
      }
docs: Returns an XML fragment representing the specified Grantee.
  
  @param grantee
  The grantee to convert to an XML representation that can be
  sent to Amazon S3 as part of a request.
  @param xml
  The XmlWriter to which to concatenate this node to.
  
  @return The given XmlWriter containing the specified grantee.
  
  @throws SdkClientException
  If the specified grantee type isn't recognized.