Package org.apache.datasketches.tuple
Class SerializerDeserializer
- java.lang.Object
-
- org.apache.datasketches.tuple.SerializerDeserializer
-
public final class SerializerDeserializer extends Object
Multipurpose serializer-deserializer for a collection of sketches defined by the enum.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SerializerDeserializer.SketchType
Defines the sketch classes that this SerializerDeserializer can handle.
-
Constructor Summary
Constructors Constructor Description SerializerDeserializer()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SerializerDeserializer.SketchType
getSketchType(org.apache.datasketches.memory.Memory mem)
Gets the sketch type byte from the given Memory imagestatic void
validateFamily(byte familyId, byte preambleLongs)
Validates the preamble-Longs value given the family IDstatic void
validateType(byte sketchTypeByte, SerializerDeserializer.SketchType expectedType)
Validates the sketch type byte versus the expected value
-
-
-
Method Detail
-
validateFamily
public static void validateFamily(byte familyId, byte preambleLongs)
Validates the preamble-Longs value given the family ID- Parameters:
familyId
- the given family IDpreambleLongs
- the given preambleLongs value
-
validateType
public static void validateType(byte sketchTypeByte, SerializerDeserializer.SketchType expectedType)
Validates the sketch type byte versus the expected value- Parameters:
sketchTypeByte
- the given sketch type byteexpectedType
- the expected value
-
getSketchType
public static SerializerDeserializer.SketchType getSketchType(org.apache.datasketches.memory.Memory mem)
Gets the sketch type byte from the given Memory image- Parameters:
mem
- the given Memory image- Returns:
- the SketchType
-
-