code: public static byte[] opaqueToBytes(String opaqueString)
      {
          if (!opaqueString.startsWith(OPAQUE_PREFIX))
              throw new ServiceLocationException("Opaque strings must begin with " + OPAQUE_PREFIX, SLPError.PARSE_ERROR);
          if (opaqueString.length() % 3 != 0)
              throw new ServiceLocationException("Opaque strings must be of the form: [\\<HEX><HEX>]+", SLPError.PARSE_ERROR);
  
          byte[] result = new byte[(opaqueString.length() - OPAQUE_PREFIX.length()) / 3];
          int position = 0;
          int index = OPAQUE_PREFIX.length();
          while (index < opaqueString.length())
          {
              if (opaqueString.charAt(index) != ESCAPE)
                  throw new ServiceLocationException("Invalid escape sequence at index " + index + " of " + opaqueString, SLPError.PARSE_ERROR);
              ++index;
              String hexString = opaqueString.substring(index, index + 2);
              result[position] = (byte)(Integer.parseInt(hexString, 16) & 0xFF);
              ++position;
              index += 2;
          }
          return result;
      }
docs: Returns a byte array containing the bytes parsed from the given opaque string,
  except the initial opaque prefix \FF.
  <br />
  For example the string <code>\FF\CA\FE</code> will be converted into the byte array
  <code>[0xCA, 0xFE]</code>.
  
  @param opaqueString The opaque string containing the bytes to parse
  @return the byte array obtained from parsing the given string
  @throws ServiceLocationException If the parsing fails
  @see #bytesToOpaque(byte[])