public static boolean setUserMetadataHeaders(byte[] userMetadata, RestResponseChannel restResponseChannel,
      Set<String> keysToNotPrefix) {
    Map<String, String> userMetadataMap = buildUserMetadata(userMetadata);
    if (userMetadataMap != null) {
      setUserMetadataHeaders(userMetadataMap, restResponseChannel, keysToNotPrefix);
      return true;
    } else {
      return false;
    }
  }
Sets the user metadata in the headers of the response.
@param userMetadata byte array containing user metadata that needs to be sent.
@param restResponseChannel the {@link RestResponseChannel} that is used for sending the response.
@param keysToNotPrefix a set of user metadata keys to not add user metadata prefix in the response header
@return {@code true} if the user metadata was successfully deserialized into headers, {@code false} if not.
@throws RestServiceException if there are any problems setting the header.
ambry-api/src/main/java/com/github/ambry/rest/RestUtils.java