Package com.amazon.ion.impl.bin
Class IonEncoder_1_1
java.lang.Object
com.amazon.ion.impl.bin.IonEncoder_1_1
Provides functions for writing various Ion values to a WriteBuffer.
This class can be subsumed by IonRawBinaryWriter_1_1, when it is created.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intwriteAnnotations(com.amazon.ion.impl.bin.WriteBuffer buffer, long[] annotations) Writes annotations using the given symbol addresses.static intwriteBlobValue(com.amazon.ion.impl.bin.WriteBuffer buffer, byte[] value) Writes a Blob to the given WriteBuffer using the Ion 1.1 encoding for Ion Blobs.static intwriteBoolValue(com.amazon.ion.impl.bin.WriteBuffer buffer, boolean value) Writes an Ion Bool value to the given WriteBuffer.static intwriteClobValue(com.amazon.ion.impl.bin.WriteBuffer buffer, byte[] value) Writes a Clob to the given WriteBuffer using the Ion 1.1 encoding for Ion Clobs.static intwriteDecimalValue(com.amazon.ion.impl.bin.WriteBuffer buffer, BigDecimal value) static intwriteFloat(com.amazon.ion.impl.bin.WriteBuffer buffer, double value) Writes a double to the given WriteBuffer using the Ion 1.1 encoding for Ion Floats.static intwriteFloat(com.amazon.ion.impl.bin.WriteBuffer buffer, float value) Writes a float to the given WriteBuffer using the Ion 1.1 encoding for Ion Floats.static intwriteIntValue(com.amazon.ion.impl.bin.WriteBuffer buffer, long value) Writes an Ion Integer value to the given WriteBuffer.static intwriteIntValue(com.amazon.ion.impl.bin.WriteBuffer buffer, BigInteger value) Writes an Ion Integer value to the given WriteBuffer.static intwriteNullValue(com.amazon.ion.impl.bin.WriteBuffer buffer, IonType ionType) Writes an Ion Null value to the given WriteBuffer.static intwriteStringValue(com.amazon.ion.impl.bin.WriteBuffer buffer, String value) Writes a String to the given WriteBuffer using the Ion 1.1 encoding for Ion Strings.static intwriteSymbolValue(com.amazon.ion.impl.bin.WriteBuffer buffer, long value) Writes an interned Symbol's address to the given WriteBuffer using the Ion 1.1 encoding for Ion Symbols.static intwriteSymbolValue(com.amazon.ion.impl.bin.WriteBuffer buffer, String value) Writes an inline Symbol to the given WriteBuffer using the Ion 1.1 encoding for Ion Symbols.static intwriteTimestampValue(com.amazon.ion.impl.bin.WriteBuffer buffer, Timestamp value) Writes a Timestamp to the given WriteBuffer using the Ion 1.1 encoding for Ion Timestamps.
-
Constructor Details
-
IonEncoder_1_1
public IonEncoder_1_1()
-
-
Method Details
-
writeNullValue
Writes an Ion Null value to the given WriteBuffer.- Returns:
- the number of bytes written
-
writeBoolValue
public static int writeBoolValue(com.amazon.ion.impl.bin.WriteBuffer buffer, boolean value) Writes an Ion Bool value to the given WriteBuffer.- Returns:
- the number of bytes written
-
writeIntValue
public static int writeIntValue(com.amazon.ion.impl.bin.WriteBuffer buffer, long value) Writes an Ion Integer value to the given WriteBuffer.- Returns:
- the number of bytes written
-
writeIntValue
Writes an Ion Integer value to the given WriteBuffer.- Returns:
- the number of bytes written
-
writeFloat
public static int writeFloat(com.amazon.ion.impl.bin.WriteBuffer buffer, float value) Writes a float to the given WriteBuffer using the Ion 1.1 encoding for Ion Floats.- Returns:
- the number of bytes written
-
writeFloat
public static int writeFloat(com.amazon.ion.impl.bin.WriteBuffer buffer, double value) Writes a double to the given WriteBuffer using the Ion 1.1 encoding for Ion Floats.- Returns:
- the number of bytes written
-
writeDecimalValue
-
writeTimestampValue
Writes a Timestamp to the given WriteBuffer using the Ion 1.1 encoding for Ion Timestamps.- Returns:
- the number of bytes written
-
writeStringValue
Writes a String to the given WriteBuffer using the Ion 1.1 encoding for Ion Strings.- Returns:
- the number of bytes written
-
writeSymbolValue
Writes an inline Symbol to the given WriteBuffer using the Ion 1.1 encoding for Ion Symbols.- Returns:
- the number of bytes written
-
writeSymbolValue
public static int writeSymbolValue(com.amazon.ion.impl.bin.WriteBuffer buffer, long value) Writes an interned Symbol's address to the given WriteBuffer using the Ion 1.1 encoding for Ion Symbols.- Returns:
- the number of bytes written TODO: Do we need to support Symbol Addresses greater than Long.MAX_VALUE?
-
writeBlobValue
public static int writeBlobValue(com.amazon.ion.impl.bin.WriteBuffer buffer, byte[] value) Writes a Blob to the given WriteBuffer using the Ion 1.1 encoding for Ion Blobs.- Returns:
- the number of bytes written
-
writeClobValue
public static int writeClobValue(com.amazon.ion.impl.bin.WriteBuffer buffer, byte[] value) Writes a Clob to the given WriteBuffer using the Ion 1.1 encoding for Ion Clobs.- Returns:
- the number of bytes written
-
writeAnnotations
public static int writeAnnotations(com.amazon.ion.impl.bin.WriteBuffer buffer, long[] annotations) Writes annotations using the given symbol addresses.
-