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


Java IonWriter类代码示例

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


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

示例1: createResponse

import software.amazon.ion.IonWriter; //导入依赖的package包/类
private static HttpResponse createResponse(IonStruct payload) throws Exception {
    ByteArrayOutputStream bytes = new ByteArrayOutputStream();
    IonWriter writer = system.newBinaryWriter(bytes);
    payload.writeTo(writer);
    writer.close();

    HttpResponse error = new HttpResponse(ValidSdkObjects.sdkHttpFullRequest().build());
    error.setContent(new ByteArrayInputStream(bytes.toByteArray()));
    return error;
}
 
开发者ID:aws,项目名称:aws-sdk-java-v2,代码行数:11,代码来源:SdkStructuredIonFactoryTest.java

示例2: createResponse

import software.amazon.ion.IonWriter; //导入依赖的package包/类
private static HttpResponse createResponse(IonStruct payload) throws Exception {
    ByteArrayOutputStream bytes = new ByteArrayOutputStream();
    IonWriter writer = system.newBinaryWriter(bytes);
    payload.writeTo(writer);
    writer.close();

    HttpResponse error = new HttpResponse(new DefaultRequest(NO_SERVICE_NAME), NO_HTTP_REQUEST);
    error.setContent(new ByteArrayInputStream(bytes.toByteArray()));
    return error;
}
 
开发者ID:IBM,项目名称:ibm-cos-sdk-java,代码行数:11,代码来源:SdkStructuredIonFactoryTest.java

示例3: SdkIonGenerator

import software.amazon.ion.IonWriter; //导入依赖的package包/类
private SdkIonGenerator(IonWriter writer, String contentType) {
    this.writer = writer;
    this.contentType = contentType;
}
 
开发者ID:aws,项目名称:aws-sdk-java-v2,代码行数:5,代码来源:SdkIonGenerator.java

示例4: create

import software.amazon.ion.IonWriter; //导入依赖的package包/类
public static SdkIonGenerator create(IonWriterBuilder builder, String contentType) {
    ByteArrayOutputStream bytes = new ByteArrayOutputStream();
    IonWriter writer = builder.build(bytes);
    return new ByteArraySdkIonGenerator(bytes, writer, contentType);
}
 
开发者ID:aws,项目名称:aws-sdk-java-v2,代码行数:6,代码来源:SdkIonGenerator.java

示例5: ByteArraySdkIonGenerator

import software.amazon.ion.IonWriter; //导入依赖的package包/类
ByteArraySdkIonGenerator(ByteArrayOutputStream bytes, IonWriter writer, String contentType) {
    super(writer, contentType);
    this.bytes = bytes;
}
 
开发者ID:aws,项目名称:aws-sdk-java-v2,代码行数:5,代码来源:SdkIonGenerator.java

示例6: write

import software.amazon.ion.IonWriter; //导入依赖的package包/类
public static void write(String data, IonWriter writer) throws IOException {
    IonReader reader = SYSTEM.newReader(data);
    writer.writeValues(reader);
    writer.close();
}
 
开发者ID:aws,项目名称:aws-sdk-java-v2,代码行数:6,代码来源:IonParserTest.java

示例7: ByteArraySdkIonGenerator

import software.amazon.ion.IonWriter; //导入依赖的package包/类
public ByteArraySdkIonGenerator(ByteArrayOutputStream bytes, IonWriter writer, String contentType) {
    super(writer, contentType);
    this.bytes = bytes;
}
 
开发者ID:IBM,项目名称:ibm-cos-sdk-java,代码行数:5,代码来源:SdkIonGenerator.java


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