当前位置: 首页>>代码示例>>Java>>正文


Java DataOutputStream.writeChars方法代码示例

本文整理汇总了Java中java.io.DataOutputStream.writeChars方法的典型用法代码示例。如果您正苦于以下问题:Java DataOutputStream.writeChars方法的具体用法?Java DataOutputStream.writeChars怎么用?Java DataOutputStream.writeChars使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.io.DataOutputStream的用法示例。


在下文中一共展示了DataOutputStream.writeChars方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: saveBinary

import java.io.DataOutputStream; //导入方法依赖的package包/类
public static void saveBinary(OutputStream out) throws IOException {
    sanityCheck();

    DataOutputStream dataOut = new DataOutputStream(out);
    writeShortTable(dataOut, head);
    writeShortTable(dataOut, table_scriptIDs);
    writeShortTable(dataOut, table_scriptFonts);
    writeShortTable(dataOut, table_elcIDs);
    writeShortTable(dataOut, table_sequences);
    writeShortTable(dataOut, table_fontfileNameIDs);
    writeShortTable(dataOut, table_componentFontNameIDs);
    writeShortTable(dataOut, table_filenames);
    writeShortTable(dataOut, table_awtfontpaths);
    writeShortTable(dataOut, table_exclusions);
    writeShortTable(dataOut, table_proportionals);
    writeShortTable(dataOut, table_scriptFontsMotif);
    writeShortTable(dataOut, table_alphabeticSuffix);
    writeShortTable(dataOut, table_stringIDs);
    //stringTable
    dataOut.writeChars(new String(table_stringTable));
    out.close();
    if (verbose) {
        dump();
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:26,代码来源:FontConfiguration.java

示例2: getPath

import java.io.DataOutputStream; //导入方法依赖的package包/类
static Path getPath(final String location, final FileSystem fs)
    throws IOException {
  Path path = new Path(location);

  // create a multi-block file on hdfs
  DataOutputStream out = fs.create(path, true, 4096, (short) 2, 512, null);
  for (int i = 0; i < 1000; ++i) {
    out.writeChars("Hello\n");
  }
  out.close();

  return path;
}
 
开发者ID:naver,项目名称:hadoop,代码行数:14,代码来源:TestDelegatingInputFormat.java

示例3: createInputs

import java.io.DataOutputStream; //导入方法依赖的package包/类
private void createInputs(FileSystem fs, Path inDir, String fileName)
    throws IOException, TimeoutException, InterruptedException {
  // create a multi-block file on hdfs
  Path path = new Path(inDir, fileName);
  final short replication = 2;
  DataOutputStream out = fs.create(path, true, 4096,
                                   replication, 512, null);
  for(int i=0; i < 1000; ++i) {
    out.writeChars("Hello\n");
  }
  out.close();
  System.out.println("Wrote file");
  DFSTestUtil.waitReplication(fs, path, replication);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:15,代码来源:TestMRCJCFileInputFormat.java


注:本文中的java.io.DataOutputStream.writeChars方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。