public final class DecimalSerializer extends Object implements Serializer<Decimal>
Decimal.| Constructor and Description |
|---|
DecimalSerializer(int precision,
int scale) |
| Modifier and Type | Method and Description |
|---|---|
Decimal |
copy(Decimal from)
Creates a deep copy of the given element in a new element.
|
Decimal |
deserialize(DataInputView source)
De-serializes a record from the given source input view.
|
Decimal |
deserializeFromString(String s)
De-serializes a record from string.
|
DecimalSerializer |
duplicate()
Creates a deep copy of this serializer if it is necessary, i.e.
|
boolean |
equals(Object o) |
int |
hashCode() |
void |
serialize(Decimal record,
DataOutputView target)
Serializes the given record to the given target output view.
|
String |
serializeToString(Decimal record)
Serializes the given record to string.
|
public Decimal copy(Decimal from)
Serializercopy in interface Serializer<Decimal>from - The element reuse be copied.public void serialize(Decimal record, DataOutputView target) throws IOException
Serializerserialize in interface Serializer<Decimal>record - The record to serialize.target - The output view to write the serialized data to.IOException - Thrown, if the serialization encountered an I/O related error. Typically
raised by the output view, which may have an underlying I/O channel to which it
delegates.public Decimal deserialize(DataInputView source) throws IOException
Serializerdeserialize in interface Serializer<Decimal>source - The input view from which to read the data.IOException - Thrown, if the de-serialization encountered an I/O related error.
Typically raised by the input view, which may have an underlying I/O channel from which
it reads.public String serializeToString(Decimal record)
SerializerserializeToString in interface Serializer<Decimal>record - The record to serialize.public Decimal deserializeFromString(String s)
SerializerdeserializeFromString in interface Serializer<Decimal>s - The string to de-serialize.public DecimalSerializer duplicate()
SerializerWe need this because Serializers might be used in several threads. Stateless serializers are inherently thread-safe while stateful serializers might not be thread-safe.
duplicate in interface Serializer<Decimal>Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.