org.eclipse.emf.ecore.resource.impl.ResourceImpl.save()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(109)

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

ResourceImpl.save介绍

[英]Saves the resource to the output stream using the specified options.

This implementation is final; clients should override #doSave.
[中]使用指定的选项将资源保存到输出流。
这个实现是[$0$];客户端应该覆盖#doSave。

代码示例

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore

try
 save(outputStream, options);

代码示例来源:origin: org.jabylon/properties

@Override
public void save(Map<?, ?> options) throws IOException {
  ReentrantReadWriteLock lock = LOCKS
      .getUnchecked(getURI() == null ? "temp" : getURI().toFileString());
  WriteLock writeLock = lock.writeLock();
  try {
    if (writeLock.tryLock(2, TimeUnit.MINUTES)) {
      super.save(options);
    }
    else {
      writeLock = null;
      throw new IOException("Could not save " + getURI()+ ". It was locked");
    }
  } catch (InterruptedException e) {
    LOG.warn("Interrupted while trying to aquire write lock for {}",
        getURI());
    throw new IOException("Could not save " + getURI());
  } finally {
    if (writeLock != null)
      writeLock.unlock();
  }
}

代码示例来源:origin: org.eclipse.emf/org.eclipse.emf.ecore

try
 save(outputStream, options);

代码示例来源:origin: org.eclipse.emf/org.eclipse.emf.ecore

try
 save(temporaryFileOutputStream, options);

代码示例来源:origin: org.eclipse.emf/org.eclipse.emf.ecore

try
 save(memoryBuffer, options);

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore

try
 save(memoryBuffer, options);

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore

try
 save(temporaryFileOutputStream, options);

相关文章

微信公众号

最新文章

更多