use of org.omg.IOP.TaggedComponent in project wildfly by wildfly.
the class CSIv2Util method createCopy.
/**
* <p>
* Make a deep copy of an {@code IOP:TaggedComponent}.
* </p>
*
* @param tc the {@code TaggedComponent} to be copied.
* @return a reference to the created copy.
*/
public static TaggedComponent createCopy(TaggedComponent tc) {
TaggedComponent copy = null;
if (tc != null) {
byte[] buf = new byte[tc.component_data.length];
System.arraycopy(tc.component_data, 0, buf, 0, tc.component_data.length);
copy = new TaggedComponent(tc.tag, buf);
}
return copy;
}
Aggregations