Classes | Namespaces | Typedefs | Functions

Encoder.hh File Reference

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. More...

#include <stdint.h>
#include <string>
#include <vector>
#include "ValidSchema.hh"
#include "Stream.hh"
#include <boost/shared_ptr.hpp>

Go to the source code of this file.

Classes

class  avro::Encoder

Namespaces

namespace  avro
 

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.


Typedefs

typedef boost::shared_ptr
< Encoder > 
avro::EncoderPtr

Functions

EncoderPtr avro::binaryEncoder ()
 Returns an encoder that can encode binary Avro standard.
EncoderPtr avro::validatingEncoder (const ValidSchema &schema, const EncoderPtr &base)
 Returns an encoder that validates sequence of calls to an underlying Encoder against the given schema.
EncoderPtr avro::jsonEncoder (const ValidSchema &schema)
 Returns an encoder that can encode Avro standard for JSON.

Detailed Description

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.

See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Low level support for encoding avro values. This class has two types of funtions. One type of functions support the writing of leaf values (for example, encodeLong and encodeString). These functions have analogs in Decoder.

The other type of functions support the writing of maps and arrays. These functions are arrayStart, startItem, and arrayEnd (and similar functions for maps). Some implementations of Encoder handle the buffering required to break large maps and arrays into blocks, which is necessary for applications that want to do streaming.