gpt4 book ai didi

net.sf.okapi.common.skeleton.ZipSkeleton.getEntry()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-17 18:37:31 31 4
gpt4 key购买 nike

本文整理了Java中net.sf.okapi.common.skeleton.ZipSkeleton.getEntry()方法的一些代码示例,展示了ZipSkeleton.getEntry()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipSkeleton.getEntry()方法的具体详情如下:
包路径:net.sf.okapi.common.skeleton.ZipSkeleton
类名称:ZipSkeleton
方法名:getEntry

ZipSkeleton.getEntry介绍

暂无

代码示例

代码示例来源:origin: net.sf.okapi.filters/okapi-filter-idml

zipOutputStream.putNextEntry(new ZipEntry(skeleton.getEntry().getName()));
  zipOutputStream.write(modifiedContents.getBytes(StandardCharsets.UTF_8));
} else {
  InputStream input = zipOriginal.getInputStream(skeleton.getEntry());
  int len;
  while ((len = input.read(buffer)) > 0) {

代码示例来源:origin: net.sf.okapi/okapi-core

if (original == null)
  original = zipOriginal;
ZipEntry entry = skel.getEntry();

代码示例来源:origin: net.sf.okapi.filters/okapi-filter-openxml

zipOut.putNextEntry(new ZipEntry(skeleton.getEntry().getName()));
  InputStream input = zipOriginal.getInputStream(skeleton.getEntry());
  int len;
  while ( (len = input.read(buffer)) > 0 ) {

代码示例来源:origin: net.sf.okapi/okapi-core

protected void processStartSubDocument (StartSubDocument res) {
  ZipSkeleton skel = (ZipSkeleton)res.getSkeleton();
  ZipEntry entry = skel.getEntry();
  if (entry != null)
    entryName = entry.getName();
  // Set the temporary path and create it
  try {
    tempFile = File.createTempFile("~okapi-9_", null);
  }
  catch ( IOException e ) {
    throw new OkapiException(e);
  }
  
  // Instantiate the filter writer for that entry if not set from outside with setSubDocWriter()
  if (subDocWriter == null) {
    subDocWriter = createSubDocumentFilterWriter(res);
  }            
  subDocWriter.setOutput(tempFile.getAbsolutePath());
      
  StartDocument sd = convertToStartDocument(res);
  subDocWriter.handleEvent(new Event(EventType.START_DOCUMENT, sd));
}

代码示例来源:origin: net.sf.okapi.filters/okapi-filter-idml

private void processStartSubDocument(StartSubDocument res) {
  ndxSubDoc++;
  // Set the temporary path and create it
  try {
    tempFile = File.createTempFile("~okapi-22_idmlTmp" + ndxSubDoc + "_", null);
  } catch (IOException e) {
    throw new OkapiIOException("Error opening temporary zip output file.");
  }
  subDocEntry = ((ZipSkeleton) res.getSkeleton()).getEntry();
  subDocWriter = new SubDocumentWriter(
      parameters, outputFactory, StandardCharsets.UTF_8, tempFile.getAbsolutePath(),
      new ReferenceableEventsWriter(
        new ReferenceableEventsMerger(eventFactory, targetLocale),
        new StyleRangeEventsGenerator(eventFactory)
      )
  );
  StartDocument sd = new StartDocument("sd");
  sd.setLineBreak("\n");
  sd.setSkeleton(res.getSkeleton());
  sd.setLocale(sourceLocale);
  subDocWriter.handleEvent(new Event(EventType.START_DOCUMENT, sd));
  SubDocumentValues subDocumentValues = new SubDocumentValues(subDocEntry, subDocWriter, tempFile);
  tmSubDoc.put(ndxSubDoc, subDocumentValues);
}

代码示例来源:origin: net.sf.okapi.filters/okapi-filter-openxml

ConditionalParameters conditionalParameters = (ConditionalParameters) res.getFilterParameters();
if (skel instanceof ZipSkeleton) {
  subDocEntry = ((ZipSkeleton) res.getSkeleton()).getEntry();
  String contentType = getContentTypeForPart(subDocEntry);
  if (docType.isStyledTextPart(subDocEntry.getName(), contentType)) {

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com