當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。