public final class DataOutputEncoder
extends org.apache.avro.io.Encoder
Encoder
that writes data to a DataOutput
.Constructor and Description |
---|
DataOutputEncoder() |
Modifier and Type | Method and Description |
---|---|
void |
flush() |
void |
setItemCount(long itemCount) |
void |
setOut(DataOutput out) |
void |
startItem() |
void |
writeArrayEnd() |
void |
writeArrayStart() |
void |
writeBoolean(boolean b) |
void |
writeBytes(byte[] bytes,
int start,
int len) |
void |
writeBytes(ByteBuffer bytes) |
void |
writeDouble(double d) |
void |
writeEnum(int e) |
void |
writeFixed(byte[] bytes,
int start,
int len) |
void |
writeFloat(float f) |
void |
writeIndex(int unionIndex) |
void |
writeInt(int n) |
void |
writeLong(long n) |
void |
writeMapEnd() |
void |
writeMapStart() |
void |
writeNull() |
void |
writeString(String str) |
void |
writeString(org.apache.avro.util.Utf8 utf8) |
static void |
writeVarLongCount(DataOutput out,
long val) |
public void setOut(DataOutput out)
public void flush() throws IOException
IOException
public void writeNull()
writeNull
in class org.apache.avro.io.Encoder
public void writeBoolean(boolean b) throws IOException
writeBoolean
in class org.apache.avro.io.Encoder
IOException
public void writeInt(int n) throws IOException
writeInt
in class org.apache.avro.io.Encoder
IOException
public void writeLong(long n) throws IOException
writeLong
in class org.apache.avro.io.Encoder
IOException
public void writeFloat(float f) throws IOException
writeFloat
in class org.apache.avro.io.Encoder
IOException
public void writeDouble(double d) throws IOException
writeDouble
in class org.apache.avro.io.Encoder
IOException
public void writeEnum(int e) throws IOException
writeEnum
in class org.apache.avro.io.Encoder
IOException
public void writeFixed(byte[] bytes, int start, int len) throws IOException
writeFixed
in class org.apache.avro.io.Encoder
IOException
public void writeBytes(byte[] bytes, int start, int len) throws IOException
writeBytes
in class org.apache.avro.io.Encoder
IOException
public void writeBytes(ByteBuffer bytes) throws IOException
writeBytes
in class org.apache.avro.io.Encoder
IOException
public void writeString(String str) throws IOException
writeString
in class org.apache.avro.io.Encoder
IOException
public void writeString(org.apache.avro.util.Utf8 utf8) throws IOException
writeString
in class org.apache.avro.io.Encoder
IOException
public void writeArrayStart()
writeArrayStart
in class org.apache.avro.io.Encoder
public void setItemCount(long itemCount) throws IOException
setItemCount
in class org.apache.avro.io.Encoder
IOException
public void startItem()
startItem
in class org.apache.avro.io.Encoder
public void writeArrayEnd() throws IOException
writeArrayEnd
in class org.apache.avro.io.Encoder
IOException
public void writeMapStart()
writeMapStart
in class org.apache.avro.io.Encoder
public void writeMapEnd() throws IOException
writeMapEnd
in class org.apache.avro.io.Encoder
IOException
public void writeIndex(int unionIndex) throws IOException
writeIndex
in class org.apache.avro.io.Encoder
IOException
public static void writeVarLongCount(DataOutput out, long val) throws IOException
IOException
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.