Class DataOutputEncoder

  • All Implemented Interfaces:
    Flushable

    public final class DataOutputEncoder
    extends org.apache.avro.io.Encoder
    An Encoder that writes data to a DataOutput.
    • Constructor Detail

      • DataOutputEncoder

        public DataOutputEncoder()
    • Method Detail

      • writeNull

        public void writeNull()
        Specified by:
        writeNull in class org.apache.avro.io.Encoder
      • writeBoolean

        public void writeBoolean​(boolean b)
                          throws IOException
        Specified by:
        writeBoolean in class org.apache.avro.io.Encoder
        Throws:
        IOException
      • writeInt

        public void writeInt​(int n)
                      throws IOException
        Specified by:
        writeInt in class org.apache.avro.io.Encoder
        Throws:
        IOException
      • writeLong

        public void writeLong​(long n)
                       throws IOException
        Specified by:
        writeLong in class org.apache.avro.io.Encoder
        Throws:
        IOException
      • writeFloat

        public void writeFloat​(float f)
                        throws IOException
        Specified by:
        writeFloat in class org.apache.avro.io.Encoder
        Throws:
        IOException
      • writeDouble

        public void writeDouble​(double d)
                         throws IOException
        Specified by:
        writeDouble in class org.apache.avro.io.Encoder
        Throws:
        IOException
      • writeEnum

        public void writeEnum​(int e)
                       throws IOException
        Specified by:
        writeEnum in class org.apache.avro.io.Encoder
        Throws:
        IOException
      • writeFixed

        public void writeFixed​(byte[] bytes,
                               int start,
                               int len)
                        throws IOException
        Specified by:
        writeFixed in class org.apache.avro.io.Encoder
        Throws:
        IOException
      • writeBytes

        public void writeBytes​(byte[] bytes,
                               int start,
                               int len)
                        throws IOException
        Specified by:
        writeBytes in class org.apache.avro.io.Encoder
        Throws:
        IOException
      • writeBytes

        public void writeBytes​(ByteBuffer bytes)
                        throws IOException
        Specified by:
        writeBytes in class org.apache.avro.io.Encoder
        Throws:
        IOException
      • writeString

        public void writeString​(String str)
                         throws IOException
        Overrides:
        writeString in class org.apache.avro.io.Encoder
        Throws:
        IOException
      • writeString

        public void writeString​(org.apache.avro.util.Utf8 utf8)
                         throws IOException
        Specified by:
        writeString in class org.apache.avro.io.Encoder
        Throws:
        IOException
      • writeArrayStart

        public void writeArrayStart()
        Specified by:
        writeArrayStart in class org.apache.avro.io.Encoder
      • setItemCount

        public void setItemCount​(long itemCount)
                          throws IOException
        Specified by:
        setItemCount in class org.apache.avro.io.Encoder
        Throws:
        IOException
      • startItem

        public void startItem()
        Specified by:
        startItem in class org.apache.avro.io.Encoder
      • writeArrayEnd

        public void writeArrayEnd()
                           throws IOException
        Specified by:
        writeArrayEnd in class org.apache.avro.io.Encoder
        Throws:
        IOException
      • writeMapStart

        public void writeMapStart()
        Specified by:
        writeMapStart in class org.apache.avro.io.Encoder
      • writeMapEnd

        public void writeMapEnd()
                         throws IOException
        Specified by:
        writeMapEnd in class org.apache.avro.io.Encoder
        Throws:
        IOException
      • writeIndex

        public void writeIndex​(int unionIndex)
                        throws IOException
        Specified by:
        writeIndex in class org.apache.avro.io.Encoder
        Throws:
        IOException