> +
> +import static com.google.common.io.BaseEncoding.base16;
> +
> +/**
> + * Converts ETag header values to byte arrays.
> + *
> + * @author Francis Devereux
> + */
> +public class ETagUtils {
> + public static byte[] convertETagToHash(String eTag) {
> + eTag = unquote(eTag);
> + return base16().lowerCase().decode(eTag);
> + }
> +
> + private static String unquote(String eTag) {
> + if (eTag.startsWith("\"") && eTag.endsWith("\"")) {
Check for eTag.length() >= 2?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/120/files#r5902203