本文整理汇总了Java中net.sourceforge.plantuml.code.TranscoderUtil类的典型用法代码示例。如果您正苦于以下问题:Java TranscoderUtil类的具体用法?Java TranscoderUtil怎么用?Java TranscoderUtil使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TranscoderUtil类属于net.sourceforge.plantuml.code包,在下文中一共展示了TranscoderUtil类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getEncodedUrl
import net.sourceforge.plantuml.code.TranscoderUtil; //导入依赖的package包/类
public List<String> getEncodedUrl() throws IOException {
final List<String> result = new ArrayList<String>();
final Transcoder transcoder = TranscoderUtil.getDefaultTranscoder();
for (BlockUml blockUml : builder.getBlockUmls()) {
final String source = blockUml.getDiagram().getSource().getPlainString();
final String encoded = transcoder.encode(source);
result.add(encoded);
}
return Collections.unmodifiableList(result);
}
示例2: processArgs
import net.sourceforge.plantuml.code.TranscoderUtil; //导入依赖的package包/类
private static boolean processArgs(Option option) throws IOException, InterruptedException {
if (option.isDecodeurl() == false && option.getNbThreads() > 0 && option.isCheckOnly() == false
&& OptionFlags.getInstance().isMetadata() == false) {
return multithread(option);
}
boolean errorGlobal = false;
for (String s : option.getResult()) {
if (option.isDecodeurl()) {
final Transcoder transcoder = TranscoderUtil.getDefaultTranscoder();
System.out.println("@startuml");
System.out.println(transcoder.decode(s));
System.out.println("@enduml");
} else {
final FileGroup group = new FileGroup(s, option.getExcludes(), option);
for (File f : group.getFiles()) {
try {
final boolean error = manageFileInternal(f, option);
if (error) {
errorGlobal = true;
}
if (error && option.isFailfastOrFailfast2()) {
return true;
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
return errorGlobal;
}
示例3: transcoder
import net.sourceforge.plantuml.code.TranscoderUtil; //导入依赖的package包/类
static Transcoder transcoder() {
return TranscoderUtil.getDefaultTranscoder();
}