Package spark.serialization
Class DefaultSerializer
- java.lang.Object
-
- spark.serialization.Serializer
-
- spark.serialization.DefaultSerializer
-
class DefaultSerializer extends Serializer
Serializer that writes the result of toString to output in UTF-8 encoding
-
-
Constructor Summary
Constructors Constructor Description DefaultSerializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanProcess(java.lang.Object element)Checks if the serializer implementation can process the element type.voidprocess(java.io.OutputStream outputStream, java.lang.Object element)Processes the provided element and serializes to output stream.-
Methods inherited from class spark.serialization.Serializer
processElement, setNext
-
-
-
-
Method Detail
-
canProcess
public boolean canProcess(java.lang.Object element)
Description copied from class:SerializerChecks if the serializer implementation can process the element type.- Specified by:
canProcessin classSerializer- Parameters:
element- the element to process.- Returns:
- true if the serializer can process the provided element.
-
process
public void process(java.io.OutputStream outputStream, java.lang.Object element) throws java.io.IOExceptionDescription copied from class:SerializerProcesses the provided element and serializes to output stream.- Specified by:
processin classSerializer- Parameters:
outputStream- the output stream.element- the element.- Throws:
java.io.IOException- In the case of IO error.
-
-