Package spark.serialization
Class DefaultSerializer
java.lang.Object
spark.serialization.Serializer
spark.serialization.DefaultSerializer
Serializer that writes the result of toString to output in UTF-8 encoding
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
canProcess
(Object element) Checks if the serializer implementation can process the element type.void
process
(OutputStream outputStream, Object element) Processes the provided element and serializes to output stream.Methods inherited from class spark.serialization.Serializer
processElement, setNext
-
Constructor Details
-
DefaultSerializer
DefaultSerializer()
-
-
Method Details
-
canProcess
Description copied from class:Serializer
Checks if the serializer implementation can process the element type.- Specified by:
canProcess
in classSerializer
- Parameters:
element
- the element to process.- Returns:
- true if the serializer can process the provided element.
-
process
Description copied from class:Serializer
Processes the provided element and serializes to output stream.- Specified by:
process
in classSerializer
- Parameters:
outputStream
- the output stream.element
- the element.- Throws:
IOException
- In the case of IO error.
-