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


Java IonBinaryWriterBuilder类代码示例

本文整理汇总了Java中software.amazon.ion.system.IonBinaryWriterBuilder的典型用法代码示例。如果您正苦于以下问题:Java IonBinaryWriterBuilder类的具体用法?Java IonBinaryWriterBuilder怎么用?Java IonBinaryWriterBuilder使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: testRoundtrip

import software.amazon.ion.system.IonBinaryWriterBuilder; //导入依赖的package包/类
@Test
public void testRoundtrip() throws IOException {
    SdkIonGenerator generator = SdkIonGenerator.create(IonBinaryWriterBuilder.standard(), "foo");
    data.generate(generator);
    IonParser parser = new IonParser(SYSTEM.newReader(generator.getBytes()), false);
    data.parse(parser);
    assertNull(parser.nextToken()); // Asserts data was read fully.
    assertFalse(parser.hasCurrentToken());
    assertFalse(parser.isClosed());
    parser.close();
    assertTrue(parser.isClosed());
}
 
开发者ID:aws,项目名称:aws-sdk-java-v2,代码行数:13,代码来源:IonRoundtripTest.java

示例2: testRoundtrip

import software.amazon.ion.system.IonBinaryWriterBuilder; //导入依赖的package包/类
@Test
public void testRoundtrip() throws IOException
{
    SdkIonGenerator generator = SdkIonGenerator.create(IonBinaryWriterBuilder.standard(), "foo");
    data.generate(generator);
    IonParser parser = new IonParser(SYSTEM.newReader(generator.getBytes()), false);
    data.parse(parser);
    assertNull(parser.nextToken()); // Asserts data was read fully.
    assertFalse(parser.hasCurrentToken());
    assertFalse(parser.isClosed());
    parser.close();
    assertTrue(parser.isClosed());
}
 
开发者ID:IBM,项目名称:ibm-cos-sdk-java,代码行数:14,代码来源:IonRoundtripTest.java

示例3: createWriter

import software.amazon.ion.system.IonBinaryWriterBuilder; //导入依赖的package包/类
public CachedWriter createWriter(boolean pretty) throws IOException {
	CachedWriter writer = new CachedWriter();
	writer.buffer = new ByteArrayOutputStream(512);
	writer.writer = IonBinaryWriterBuilder.standard().build(writer.buffer);
	return writer;
}
 
开发者ID:berkesa,项目名称:datatree-adapters,代码行数:7,代码来源:IonIon.java

示例4: write

import software.amazon.ion.system.IonBinaryWriterBuilder; //导入依赖的package包/类
@Override
public byte[] write(String data) throws IOException {
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    write(data, IonBinaryWriterBuilder.standard().build(out));
    return out.toByteArray();
}
 
开发者ID:aws,项目名称:aws-sdk-java-v2,代码行数:7,代码来源:IonParserTest.java


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