org.apache.avro.reflect

## Class CustomEncoding<T>

- java.lang.Object
- - org.apache.avro.reflect.CustomEncoding<T>

- Type Parameters:
    `T` - The class of objects that can be serialized with this encoder / decoder.
  Direct Known Subclasses:
    DateAsLongEncoding

      public abstract class CustomEncoding<T>
      extends Object

  Expert: a custom encoder and decoder that writes an object directly to avro. No validation is performed to check that the encoding conforms to the schema. Invalid implementations may result in an unreadable file. The use of `ValidatingEncoder` is recommended.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Schema` | `schema`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CustomEncoding()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected Schema` | `getSchema()`
    `protected abstract T` | `read(Object reuse, Decoder in)`
    `protected abstract void` | `write(Object datum, Encoder out)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### schema

          protected Schema schema

  - ### Constructor Detail

    - #### CustomEncoding

          public CustomEncoding()

  - ### Method Detail

    - #### write

          protected abstract void write(Object datum,
                                        Encoder out)
                                 throws IOException

      Throws:
        `IOException`

    - #### read

          protected abstract T read(Object reuse,
                                    Decoder in)
                             throws IOException

      Throws:
        `IOException`

    - #### getSchema

          protected Schema getSchema()

Copyright © 2009–2024 The Apache Software Foundation. All rights reserved.