code: private static List<Integer> exploreExtensions(ByteBuffer input, List<Integer> ciphers)
              throws SSLException {
          int length = getInt16(input);           // length of extensions
          while (length > 0) {
              int extType = getInt16(input);      // extenson type
              int extLen = getInt16(input);       // length of extension data
              if (extType == 16) {      // 0x00: ty
                  return ciphers;
              } else {                    // ignore other extensions
                  processByteVector(input, extLen);
              }
  
              length -= extLen + 4;
          }
          return null;
      }
docs: /*
  struct {
  ExtensionType extension_type;
  opaque extension_data<0..2^16-1>;
  } Extension;
  
  enum {
  server_name(0), max_fragment_length(1),
  client_certificate_url(2), trusted_ca_keys(3),
  truncated_hmac(4), status_request(5), (65535)
  } ExtensionType;