aQute.bnd.osgi.Jar.write()方法的使用及代码示例

x33g5p2x  于2022-01-22 转载在 其他  
字(5.0k)|赞(0)|评价(0)|浏览(153)

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

Jar.write介绍

[英]Convert a string to bytes with UTF8 and then output in max 72 bytes
[中]使用UTF8将字符串转换为字节,然后以最大72字节的格式输出

代码示例

代码示例来源:origin: biz.aQute/bndlib

/**
 * Write out an entry, handling proper unicode and line length constraints
 */
private static void writeEntry(OutputStream out, String name, String value) throws IOException {
  int n = write(out, 0, name + ": ");
  write(out, n, value);
  write(out, 0, "\r\n");
}

代码示例来源:origin: biz.aQute.bnd/bndlib

/**
 * Write out an entry, handling proper unicode and line length constraints
 */
private static void writeEntry(OutputStream out, String name, String value) throws IOException {
  int n = write(out, 0, name + ": ");
  write(out, n, value);
  write(out, 0, "\r\n");
}

代码示例来源:origin: biz.aQute.bnd/bnd

/**
 * Write out an entry, handling proper unicode and line length constraints
 */
private static void writeEntry(OutputStream out, String name, String value) throws IOException {
  int n = write(out, 0, name + ": ");
  write(out, n, value);
  write(out, 0, "\r\n");
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib

@Override
public void write(OutputStream out) throws Exception {
  jar.write(out);
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib

/**
 * Write out an entry, handling proper unicode and line length constraints
 */
private static void writeEntry(OutputStream out, String name, String value) throws IOException {
  int width = write(out, 0, name);
  width = write(out, width, SEPARATOR);
  write(out, width, value);
  out.write(EOL);
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd

/**
 * Write out an entry, handling proper unicode and line length constraints
 */
private static void writeEntry(OutputStream out, String name, String value) throws IOException {
  int width = write(out, 0, name);
  width = write(out, width, SEPARATOR);
  write(out, width, value);
  out.write(EOL);
}

代码示例来源:origin: biz.aQute/bndlib

@Override
public void write(OutputStream out) throws Exception {
  try {
    jar.write(out);
  }
  catch (Exception e) {
    e.printStackTrace();
    throw e;
  }
}

代码示例来源:origin: biz.aQute.bnd/bndlib

@Override
public void write(OutputStream out) throws Exception {
  try {
    jar.write(out);
  }
  catch (Exception e) {
    e.printStackTrace();
    throw e;
  }
}

代码示例来源:origin: biz.aQute.bnd/bnd

@Override
public void write(OutputStream out) throws Exception {
  try {
    jar.write(out);
  }
  catch (Exception e) {
    e.printStackTrace();
    throw e;
  }
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib

/**
 * Convert a string to bytes with UTF-8 and then output in max 72 bytes
 * 
 * @param out the output string
 * @param width the current width
 * @param s the string to output
 * @return the new width
 * @throws IOException when something fails
 */
private static int write(OutputStream out, int width, String s) throws IOException {
  byte[] bytes = s.getBytes(UTF_8);
  return write(out, width, bytes);
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd

/**
 * Convert a string to bytes with UTF-8 and then output in max 72 bytes
 * 
 * @param out the output string
 * @param width the current width
 * @param s the string to output
 * @return the new width
 * @throws IOException when something fails
 */
private static int write(OutputStream out, int width, String s) throws IOException {
  byte[] bytes = s.getBytes(UTF_8);
  return write(out, width, bytes);
}

代码示例来源:origin: biz.aQute/bndlib

public void write(String file) throws Exception {
  check();
  write(new File(file));
}

代码示例来源:origin: biz.aQute.bnd/bndlib

public void write(String file) throws Exception {
  check();
  write(new File(file));
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib

public void write(String file) throws Exception {
  check();
  write(new File(file));
}

代码示例来源:origin: com.athaydes.osgiaas/osgiaas-jar-wrap

private static File updateManifest( Jar newJar, File bundle, Manifest manifest )
    throws Exception {
  verifyDestinationFileCanBeWritten( bundle );
  newJar.setManifest( manifest );
  newJar.write( bundle );
  return bundle;
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib

public void write(File file) throws Exception {
  check();
  try (OutputStream out = IO.outputStream(file)) {
    write(out);
  } catch (Exception t) {
    IO.delete(file);
    throw t;
  }
  file.setLastModified(lastModified);
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd

public void write(File file) throws Exception {
  check();
  try (OutputStream out = IO.outputStream(file)) {
    write(out);
  } catch (Exception t) {
    IO.delete(file);
    throw t;
  }
  file.setLastModified(lastModified);
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.repository

private void save(Release releaser, Revision revision, Jar jar) throws Exception {
  String classifier = jar.getName(); // jar name is classifier
  String extension = "jar";
  File tmp = File.createTempFile(classifier, extension);
  try {
    jar.write(tmp);
    releaser.add(revision.archive(extension, classifier), tmp);
  } finally {
    IO.delete(tmp);
  }
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd

private void save(Release releaser, Revision revision, Jar jar) throws Exception {
  String classifier = jar.getName(); // jar name is classifier
  String extension = "jar";
  File tmp = File.createTempFile(classifier, extension);
  try {
    jar.write(tmp);
    releaser.add(revision.archive(extension, classifier), tmp);
  } finally {
    IO.delete(tmp);
  }
}

代码示例来源:origin: reficio/p2-maven-plugin

private void populateJar(Analyzer analyzer, File outputFile) throws Exception {
  Jar jar = analyzer.getJar();
  jar.setManifest(analyzer.calcManifest());
  try {
    jar.write(outputFile);
  } finally {
    jar.close();
  }
}

相关文章

微信公众号

最新文章

更多