code: public static int getSignatureByteArrayLength(final SignatureAlgorithm alg)
          throws JwtException {
  
          switch (alg) {
              case ES256:
                  return 64;
              case ES384:
                  return 96;
              case ES512:
                  return 132;
              default:
                  throw new JwtException("Unsupported Algorithm: " + alg.name());
          }
      }
docs: Returns the expected signature byte array length (R + S parts) for
  the specified ECDSA algorithm.
  
  @param alg The ECDSA algorithm. Must be supported and not
  {@code null}.
  @return The expected byte array length for the signature.
  @throws JwtException If the algorithm is not supported.