char[] data = fileDescriptorSource.getFileDescriptors().get(name);
return data != null ? String.valueOf(data) : null;
}
public void registerProtofiles(String... classPathResources) throws Exception {
FileDescriptorSource fileDescriptorSource = getFileDescriptorSource();
for (String classPathResource : classPathResources) {
String fileName = Paths.get(classPathResource).getFileName().toString();
String contents = Util.read(this.getClass().getResourceAsStream(classPathResource));
fileDescriptorSource.addProtoFile(fileName, contents);
}
clusterRegistry.put(REGISTRY_SCOPE, REGISTRY_KEY, fileDescriptorSource);
}