Throw EOFException in serializer.