Class IonEncoder_1_1

java.lang.Object
com.amazon.ion.impl.bin.IonEncoder_1_1

public class IonEncoder_1_1 extends Object
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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    writeAnnotations(com.amazon.ion.impl.bin.WriteBuffer buffer, long[] annotations)
    Writes annotations using the given symbol addresses.
    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.
    static int
    writeBoolValue(com.amazon.ion.impl.bin.WriteBuffer buffer, boolean value)
    Writes an Ion Bool value to the given WriteBuffer.
    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.
    static int
    writeDecimalValue(com.amazon.ion.impl.bin.WriteBuffer buffer, BigDecimal value)
     
    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.
    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.
    static int
    writeIntValue(com.amazon.ion.impl.bin.WriteBuffer buffer, long value)
    Writes an Ion Integer value to the given WriteBuffer.
    static int
    writeIntValue(com.amazon.ion.impl.bin.WriteBuffer buffer, BigInteger value)
    Writes an Ion Integer value to the given WriteBuffer.
    static int
    writeNullValue(com.amazon.ion.impl.bin.WriteBuffer buffer, IonType ionType)
    Writes an Ion Null value to the given WriteBuffer.
    static int
    writeStringValue(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 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.
    static int
    writeSymbolValue(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 int
    writeTimestampValue(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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • IonEncoder_1_1

      public IonEncoder_1_1()
  • Method Details

    • writeNullValue

      public static int writeNullValue(com.amazon.ion.impl.bin.WriteBuffer buffer, IonType ionType)
      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

      public static int writeIntValue(com.amazon.ion.impl.bin.WriteBuffer buffer, BigInteger value)
      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

      public static int writeDecimalValue(com.amazon.ion.impl.bin.WriteBuffer buffer, BigDecimal value)
    • writeTimestampValue

      public static int writeTimestampValue(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.
      Returns:
      the number of bytes written
    • writeStringValue

      public static int writeStringValue(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.
      Returns:
      the number of bytes written
    • writeSymbolValue

      public static int writeSymbolValue(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.
      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.