org.apache.avro.generic
Class GenericData

java.lang.Object
  extended by org.apache.avro.generic.GenericData

public class GenericData
extends Object

Utilities for generic Java data.


Nested Class Summary
static class GenericData.Array<T>
          Default implementation of GenericArray.
static class GenericData.Fixed
           
static class GenericData.Record
          Default implementation of GenericRecord.
 
Method Summary
static Schema induce(Object datum)
          Create a schema given an example datum.
static String toString(Object datum)
          Renders a Java datum as JSON.
static boolean validate(Schema schema, Object datum)
          Returns true if a Java datum matches a schema.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

validate

public static boolean validate(Schema schema,
                               Object datum)
Returns true if a Java datum matches a schema.


toString

public static String toString(Object datum)
Renders a Java datum as JSON.


induce

public static Schema induce(Object datum)
Create a schema given an example datum.



Copyright © 2009 The Apache Software Foundation