Here you can find the source of writeOpaqueValue(final String opaque)
private static byte[] writeOpaqueValue(final String opaque)
//package com.java2s; /*//from w ww. j a v a2 s.c o m * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ import javax.xml.bind.DatatypeConverter; public class Main { private static final String SEPARATOR = ":"; private static final String EMPTY_SEPARATOR = ""; private static byte[] writeOpaqueValue(final String opaque) { final String joined = opaque.replace(SEPARATOR, EMPTY_SEPARATOR); return DatatypeConverter.parseHexBinary(joined); } }