# Uses of Class
org.apache.avro.Schema

Packages that use Schema
Package
Description
org.apache.avro
Avro kernel classes.
org.apache.avro.data
Interfaces and base classes shared by generic, specific and reflect.
org.apache.avro.file
A container file for Avro data.
org.apache.avro.generic
A generic representation for Avro data.
org.apache.avro.io
Utilities for Encoding and Decoding Avro data.
org.apache.avro.io.parsing
Implementation of Avro schemas as LL(1) grammars.
org.apache.avro.message
org.apache.avro.path
Interfaces and base classes for AvroPath.
org.apache.avro.reflect
Use Java reflection to generate schemas and protocols for existing classes.
org.apache.avro.specific
Generate specific Java classes for schemas and protocols.
org.apache.avro.util
Common utility classes.

## Uses of Schema in org.apache.avro

Fields in org.apache.avro declared as Schema
Modifier and Type
Field
Description
`final Schema`
Resolver.Action.`reader`
`static final Schema`
Protocol.`SYSTEM_ERROR`
An error that can be thrown by any message.
`static final Schema`
Protocol.`SYSTEM_ERRORS`
Union type for generating system errors.
`final Schema`
Resolver.Action.`writer`
Methods in org.apache.avro that return Schema
Modifier and Type
Method
Description
`Schema`
LogicalType.`addToSchema(Schema schema)`
Add this logical type to the given Schema.
`Schema`
LogicalTypes.Decimal.`addToSchema(Schema schema)`
`static Schema`
Schema.`applyAliases(Schema writer, Schema reader)`
Rewrite a writer's schema using the aliases from a reader's schema.
`static Schema`
Schema.`create(Schema.Type type)`
Create a schema for a primitive type.
`static Schema`
Schema.`createArray(Schema elementType)`
Create an array schema.
`static Schema`
Schema.`createEnum(String name, String doc, String namespace, List<String> values)`
Create an enum schema.
`static Schema`
Schema.`createEnum(String name, String doc, String namespace, List<String> values, String enumDefault)`
Create an enum schema.
`static Schema`
Schema.`createFixed(String name, String doc, String space, int size)`
Create a fixed schema.
`static Schema`
Schema.`createMap(Schema valueType)`
Create a map schema.
`static Schema`
Schema.`createRecord(String name, String doc, String namespace, boolean isError)`
Create a named record schema.
`static Schema`
Schema.`createRecord(String name, String doc, String namespace, boolean isError, List<Schema.Field> fields)`
Create a named record schema with fields already set.
`static Schema`
Schema.`createRecord(List<Schema.Field> fields)`
Deprecated.
This method allows to create Schema objects that cannot be parsed by `SchemaParser.parse(CharSequence)`.
`static Schema`
Schema.`createUnion(List<Schema> types)`
Create a union schema.
`static Schema`
Schema.`createUnion(Schema... types)`
Create a union schema.
`Schema`
ParseContext.`find(String name, String namespace)`
Find a schema by name and namespace.
`Schema`
Schema.`getElementType()`
If this is an array, returns its element type.
`Schema`
Protocol.Message.`getErrors()`
Errors that might be thrown.
`Schema`
ParseContext.`getNamedSchema(String fullName)`
Get a schema by name.
`Schema`
SchemaCompatibility.SchemaPairCompatibility.`getReader()`
Gets the reader schema that was validated.
`Schema`
SchemaCompatibility.Incompatibility.`getReaderFragment()`
Returns the fragment of the reader schema that failed compatibility check.
`Schema`
Conversion.`getRecommendedSchema()`
`Schema`
Conversions.BigDecimalConversion.`getRecommendedSchema()`
`Schema`
Conversions.DecimalConversion.`getRecommendedSchema()`
`Schema`
Conversions.DurationConversion.`getRecommendedSchema()`
`Schema`
Conversions.UUIDConversion.`getRecommendedSchema()`
`Schema`
Protocol.Message.`getRequest()`
The parameters of this message.
`Schema`
Protocol.Message.`getResponse()`
The returned data.
`Schema`
Protocol.`getType(String name)`
Returns the named type.
`Schema`
UnresolvedUnionException.`getUnionSchema()`
`Schema`
Schema.`getValueType()`
If this is a map, returns its value type.
`Schema`
SchemaCompatibility.SchemaPairCompatibility.`getWriter()`
Gets the writer schema that was validated.
`Schema`
SchemaCompatibility.Incompatibility.`getWriterFragment()`
Returns the fragment of the writer schema that failed compatibility check.
`Schema`
SchemaParser.ParseResult.`mainSchema()`
The main schema parsed from a file.
`Schema`
FormattedSchemaParser.`parse(ParseContext parseContext, URI baseUri, CharSequence formattedSchema)`
Parse schema definitions from a text based source.
`Schema`
JsonSchemaParser.`parse(ParseContext parseContext, URI baseUri, CharSequence formattedSchema)`
`static Schema`
Schema.`parse(File file)`
Deprecated.
use `SchemaParser` instead.
`static Schema`
Schema.`parse(InputStream in)`
Deprecated.
use `SchemaParser` instead.
`static Schema`
Schema.`parse(String jsonSchema)`
Deprecated.
use `SchemaParser` instead.
`static Schema`
Schema.`parse(String jsonSchema, boolean validate)`
Deprecated.
use `SchemaParser` instead.
`Schema`
Schema.Parser.`parse(File file)`
Parse a schema from the provided file.
`Schema`
Schema.Parser.`parse(InputStream in)`
Parse a schema from the provided stream.
`Schema`
Schema.Parser.`parse(String s)`
Parse a schema from the provided string.
`Schema`
Schema.Parser.`parse(String s, String... more)`
Read a schema from one or more json strings
`static Schema`
JsonSchemaParser.`parseInternal(String... fragments)`
Parse a schema written in the internal (JSON) format without any validations.
`Schema`
Schema.Parser.`parseInternal(String s)`
`Schema`
ParseContext.`resolve(Schema schema)`
Resolve unresolved references in a schema that was parsed for this context using the types known to this context.
`Schema`
SchemaParser.`resolve(SchemaParser.ParseResult result)`
Deprecated.
`Schema`
Schema.Field.`schema()`
This field's `Schema`.
Methods in org.apache.avro that return types with arguments of type Schema
Modifier and Type
Method
Description
`static SchemaBuilder.ArrayBuilder<Schema>`
SchemaBuilder.`array()`
Create a builder for an Avro array This is equivalent to:
`static SchemaBuilder.TypeBuilder<Schema>`
SchemaBuilder.`builder()`
Create a builder for Avro schemas.
`static SchemaBuilder.TypeBuilder<Schema>`
SchemaBuilder.`builder(String namespace)`
Create a builder for Avro schemas with a default namespace.
`static SchemaBuilder.EnumBuilder<Schema>`
SchemaBuilder.`enumeration(String name)`
Create a builder for an Avro enum with the specified name and symbols (values).
`static SchemaBuilder.FixedBuilder<Schema>`
SchemaBuilder.`fixed(String name)`
Create a builder for an Avro fixed type with the specified name and size.
`List<Schema>`
SchemaParser.`getParsedNamedSchemas()`
Get all parsed schemata.
`Collection<Schema>`
Protocol.`getTypes()`
The types of this protocol.
`List<Schema>`
Schema.`getTypes()`
If this is a union, returns its types.
`Map<String,Schema>`
Schema.Parser.`getTypes()`
Returns the set of defined, named types known to this parser.
`Collection<Schema>`
Protocol.`getUnresolvedTypes()`
Deprecated.
can return invalid schemata: do NOT use!
`static SchemaBuilder.MapBuilder<Schema>`
SchemaBuilder.`map()`
Create a builder for an Avro map This is equivalent to:
`static SchemaBuilder.BaseTypeBuilder<Schema>`
SchemaBuilder.`nullable()`
Create a builder for a union of a type and null.
`List<Schema>`
SchemaParser.ParseResult.`parsedNamedSchemas()`
The list of named schemata that were parsed.
`static SchemaBuilder.RecordBuilder<Schema>`
SchemaBuilder.`record(String name)`
Create a builder for an Avro record with the specified name.
`List<Schema>`
ParseContext.`resolveAllSchemas()`
Resolve all (named) schemas that were parsed.
`Map<String,Schema>`
ParseContext.`typesByName()`
Return all known types by their fullname.
`static SchemaBuilder.BaseTypeBuilder<SchemaBuilder.UnionAccumulator<Schema>>`
SchemaBuilder.`unionOf()`
Create a builder for an Avro union This is equivalent to:
Methods in org.apache.avro with parameters of type Schema
Modifier and Type
Method
Description
`Schema`
LogicalType.`addToSchema(Schema schema)`
Add this logical type to the given Schema.
`Schema`
LogicalTypes.Decimal.`addToSchema(Schema schema)`
`static Schema`
Schema.`applyAliases(Schema writer, Schema reader)`
Rewrite a writer's schema using the aliases from a reader's schema.
`static SchemaCompatibility.SchemaPairCompatibility`
SchemaCompatibility.`checkReaderWriterCompatibility(Schema reader, Schema writer)`
Validates that the provided reader schema can be used to decode avro data written with the provided writer schema.
`SchemaParser.ParseResult`
ParseContext.`commit(Schema mainSchema)`
`static Object`
Conversions.`convertToLogicalType(Object datum, Schema schema, LogicalType type, Conversion<?> conversion)`
Convert an underlying representation of a logical type (such as a ByteBuffer) to a higher level object (such as a BigDecimal).
`static <T> Object`
Conversions.`convertToRawType(Object datum, Schema schema, LogicalType type, Conversion<T> conversion)`
Convert a high level representation of a logical type (such as a BigDecimal) to its underlying representation object (such as a ByteBuffer)
`static Schema`
Schema.`createArray(Schema elementType)`
Create an array schema.
`static Schema`
Schema.`createMap(Schema valueType)`
Create a map schema.
`Protocol.Message`
Protocol.`createMessage(String name, String doc, Map<String,?> propMap, Schema request)`
Create a one-way message.
`Protocol.Message`
Protocol.`createMessage(String name, String doc, Map<String,?> propMap, Schema request, Schema response, Schema errors)`
Create a two-way message.
`Protocol.Message`
Protocol.`createMessage(String name, String doc, JsonProperties propMap, Schema request)`
Create a one-way message.
`Protocol.Message`
Protocol.`createMessage(String name, String doc, JsonProperties propMap, Schema request, Schema response, Schema errors)`
Create a two-way message.
`Protocol.Message`
Protocol.`createMessage(String name, String doc, Schema request)`
Deprecated.
`Protocol.Message`
Protocol.`createMessage(String name, String doc, Schema request, Schema response, Schema errors)`
Deprecated.
`Protocol.Message`
Protocol.`createMessage(Protocol.Message m, Schema request)`
Create a one-way message using the `name`, `doc`, and `props` of `m`.
`Protocol.Message`
Protocol.`createMessage(Protocol.Message m, Schema request, Schema response, Schema errors)`
Create a two-way message using the `name`, `doc`, and `props` of `m`.
`static Schema`
Schema.`createUnion(Schema... types)`
Create a union schema.
`String`
CanonicalSchemaFormatterFactory.`format(Schema schema)`
`String`
JsonSchemaFormatter.`format(Schema schema)`
`static String`
SchemaFormatter.`format(String name, Schema schema)`
Format a schema with the specified format.
`String`
SchemaFormatter.`format(Schema schema)`
Write the specified schema as a String.
`T`
Conversion.`fromArray(Collection<?> value, Schema schema, LogicalType type)`
`T`
Conversion.`fromBoolean(Boolean value, Schema schema, LogicalType type)`
`T`
Conversion.`fromBytes(ByteBuffer value, Schema schema, LogicalType type)`
`BigDecimal`
Conversions.BigDecimalConversion.`fromBytes(ByteBuffer value, Schema schema, LogicalType type)`
`BigDecimal`
Conversions.DecimalConversion.`fromBytes(ByteBuffer value, Schema schema, LogicalType type)`
`T`
Conversion.`fromCharSequence(CharSequence value, Schema schema, LogicalType type)`
`UUID`
Conversions.UUIDConversion.`fromCharSequence(CharSequence value, Schema schema, LogicalType type)`
`T`
Conversion.`fromDouble(Double value, Schema schema, LogicalType type)`
`T`
Conversion.`fromEnumSymbol(GenericEnumSymbol<?> value, Schema schema, LogicalType type)`
`T`
Conversion.`fromFixed(GenericFixed value, Schema schema, LogicalType type)`
`BigDecimal`
Conversions.DecimalConversion.`fromFixed(GenericFixed value, Schema schema, LogicalType type)`
`TimePeriod`
Conversions.DurationConversion.`fromFixed(GenericFixed value, Schema schema, LogicalType type)`
`UUID`
Conversions.UUIDConversion.`fromFixed(GenericFixed value, Schema schema, LogicalType type)`
`T`
Conversion.`fromFloat(Float value, Schema schema, LogicalType type)`
`T`
Conversion.`fromInt(Integer value, Schema schema, LogicalType type)`
`T`
Conversion.`fromLong(Long value, Schema schema, LogicalType type)`
`T`
Conversion.`fromMap(Map<?,?> value, Schema schema, LogicalType type)`
`T`
Conversion.`fromRecord(IndexedRecord value, Schema schema, LogicalType type)`
`static LogicalType`
LogicalTypes.`fromSchema(Schema schema)`
Returns the `LogicalType` from the schema, if one is present.
`LogicalType`
LogicalTypes.LogicalTypeFactory.`fromSchema(Schema schema)`
`static LogicalType`
LogicalTypes.`fromSchemaIgnoreInvalid(Schema schema)`
`static SchemaCompatibility.SchemaCompatibilityResult`
SchemaCompatibility.SchemaCompatibilityResult.`incompatible(SchemaCompatibility.SchemaIncompatibilityType incompatibilityType, Schema readerFragment, Schema writerFragment, String message, List<String> location)`
Returns a details object representing an incompatible schema pair, including error details.
`static boolean`
Resolver.Promote.`isValid(Schema w, Schema r)`
Returns true iff `w` and `r` are both primitive types and either they are the same type or `w` is promotable to `r`.
`R`
SchemaBuilder.ArrayBuilder.`items(Schema itemsSchema)`
Complete configuration of this array, setting the schema of the array items to the schema provided.
`static Schema.Field`
SchemaCompatibility.`lookupWriterField(Schema writerSchema, Schema.Field readerField)`
Identifies the writer field that corresponds to the specified reader field.
`static byte[]`
SchemaNormalization.`parsingFingerprint(String fpName, Schema s)`
Returns `SchemaNormalization.fingerprint(java.lang.String, byte[])` applied to the parsing canonical form of the supplied schema.
`static long`
SchemaNormalization.`parsingFingerprint64(Schema s)`
Returns `SchemaNormalization.fingerprint64(byte[])` applied to the parsing canonical form of the supplied schema.
`void`
ParseContext.`put(Schema schema)`
Put the schema into this context.
`Schema`
ParseContext.`resolve(Schema schema)`
Resolve unresolved references in a schema that was parsed for this context using the types known to this context.
`static Resolver.Action`
Resolver.EnumAdjust.`resolve(Schema w, Schema r, GenericData d)`
If writer and reader don't have same name, a `Resolver.ErrorAction.ErrorType.NAMES_DONT_MATCH` is returned, otherwise an appropriate `Resolver.EnumAdjust` is.
`static Resolver.Action`
Resolver.Promote.`resolve(Schema w, Schema r, GenericData d)`
Return a promotion.
`static Resolver.Action`
Resolver.ReaderUnion.`resolve(Schema w, Schema r, GenericData d, Map<Schema.SeenPair,Resolver.Action> seen)`
Returns a `Resolver.ReaderUnion` action for resolving `w` and `r`, or an `Resolver.ErrorAction` if there is no branch in the reader that matches the writer.
`static Resolver.Action`
Resolver.`resolve(Schema writer, Schema reader)`
Uses `GenericData.get()` for the `data` param.
`static Resolver.Action`
Resolver.`resolve(Schema writer, Schema reader, GenericData data)`
Returns a `Resolver.Action` tree for resolving the writer schema `writer` and the reader schema `reader`.
`static Resolver.Action`
Resolver.WriterUnion.`resolve(Schema writeSchema, Schema readSchema, GenericData data, Map<Schema.SeenPair,Resolver.Action> seen)`
`static boolean`
SchemaCompatibility.`schemaNameEquals(Schema reader, Schema writer)`
Tests the equality of two Avro named schemas.
`Collection<?>`
Conversion.`toArray(T value, Schema schema, LogicalType type)`
`Boolean`
Conversion.`toBoolean(T value, Schema schema, LogicalType type)`
`ByteBuffer`
Conversion.`toBytes(T value, Schema schema, LogicalType type)`
`ByteBuffer`
Conversions.BigDecimalConversion.`toBytes(BigDecimal value, Schema schema, LogicalType type)`
`ByteBuffer`
Conversions.DecimalConversion.`toBytes(BigDecimal value, Schema schema, LogicalType type)`
`CharSequence`
Conversion.`toCharSequence(T value, Schema schema, LogicalType type)`
`CharSequence`
Conversions.UUIDConversion.`toCharSequence(UUID value, Schema schema, LogicalType type)`
`Double`
Conversion.`toDouble(T value, Schema schema, LogicalType type)`
`GenericEnumSymbol<?>`
Conversion.`toEnumSymbol(T value, Schema schema, LogicalType type)`
`GenericFixed`
Conversion.`toFixed(T value, Schema schema, LogicalType type)`
`GenericFixed`
Conversions.DecimalConversion.`toFixed(BigDecimal value, Schema schema, LogicalType type)`
`GenericFixed`
Conversions.DurationConversion.`toFixed(TimePeriod value, Schema schema, LogicalType type)`
`GenericFixed`
Conversions.UUIDConversion.`toFixed(UUID value, Schema schema, LogicalType type)`
`Float`
Conversion.`toFloat(T value, Schema schema, LogicalType type)`
`Integer`
Conversion.`toInt(T value, Schema schema, LogicalType type)`
`Long`
Conversion.`toLong(T value, Schema schema, LogicalType type)`
`Map<?,?>`
Conversion.`toMap(T value, Schema schema, LogicalType type)`
`static String`
SchemaNormalization.`toParsingForm(Schema s)`
Returns "Parsing Canonical Form" of a schema as defined by Avro spec.
`IndexedRecord`
Conversion.`toRecord(T value, Schema schema, LogicalType type)`
`final R`
SchemaBuilder.BaseTypeBuilder.`type(Schema schema)`
Use the schema provided as the type.
`SchemaBuilder.GenericDefault<R>`
SchemaBuilder.FieldBuilder.`type(Schema type)`
Final step in configuring this field, finalizing name, namespace, alias, and order.
`void`
LogicalType.`validate(Schema schema)`
Validate this logical type for the given Schema.
`void`
LogicalTypes.BigDecimal.`validate(Schema schema)`
`void`
LogicalTypes.Date.`validate(Schema schema)`
`void`
LogicalTypes.Decimal.`validate(Schema schema)`
`void`
LogicalTypes.Duration.`validate(Schema schema)`
`void`
LogicalTypes.LocalTimestampMicros.`validate(Schema schema)`
`void`
LogicalTypes.LocalTimestampMillis.`validate(Schema schema)`
`void`
LogicalTypes.LocalTimestampNanos.`validate(Schema schema)`
`void`
LogicalTypes.TimeMicros.`validate(Schema schema)`
`void`
LogicalTypes.TimeMillis.`validate(Schema schema)`
`void`
LogicalTypes.TimestampMicros.`validate(Schema schema)`
`void`
LogicalTypes.TimestampMillis.`validate(Schema schema)`
`void`
LogicalTypes.TimestampNanos.`validate(Schema schema)`
`void`
LogicalTypes.Uuid.`validate(Schema schema)`
`void`
SchemaValidationStrategy.`validate(Schema toValidate, Schema existing)`
Validates that one schema is compatible with another.
`void`
SchemaValidator.`validate(Schema toValidate, Iterable<Schema> existing)`
Validate one schema against others.
`void`
ValidateAll.`validate(Schema toValidate, Iterable<Schema> schemasInOrder)`
`void`
ValidateLatest.`validate(Schema toValidate, Iterable<Schema> schemasInOrder)`
`R`
SchemaBuilder.MapBuilder.`values(Schema valueSchema)`
Complete configuration of this map, setting the schema of the map values to the schema provided.
Method parameters in org.apache.avro with type arguments of type Schema
Modifier and Type
Method
Description
`Schema.Parser`
Schema.Parser.`addTypes(Iterable<Schema> types)`
Adds the provided types to the set of defined, named types known to this parser.
`Schema.Parser`
Schema.Parser.`addTypes(Map<String,Schema> types)`
Deprecated.
use addTypes(Iterable<Schema> types)
`static Schema`
Schema.`createUnion(List<Schema> types)`
Create a union schema.
`void`
Protocol.`setTypes(Collection<Schema> newTypes)`
Set the types of this protocol.
`String`
Schema.`toString(Collection<Schema> referencedSchemas, boolean pretty)`
Deprecated.
`void`
SchemaValidator.`validate(Schema toValidate, Iterable<Schema> existing)`
Validate one schema against others.
`void`
ValidateAll.`validate(Schema toValidate, Iterable<Schema> schemasInOrder)`
`void`
ValidateLatest.`validate(Schema toValidate, Iterable<Schema> schemasInOrder)`
Constructors in org.apache.avro with parameters of type Schema
Modifier
Constructor
Description
`protected`
`Action(Schema w, Schema r, GenericData data, Resolver.Action.Type t)`
``
`Container(Schema w, Schema r, GenericData d, Resolver.Action e)`
``
`DoNothing(Schema w, Schema r, GenericData d)`
``
`ErrorAction(Schema w, Schema r, GenericData d, Resolver.ErrorAction.ErrorType e)`
``
`Field(String name, Schema schema)`
``
`Field(String name, Schema schema, String doc)`
``
`Field(String name, Schema schema, String doc, Object defaultValue)`
``
`Field(String name, Schema schema, String doc, Object defaultValue, Schema.Field.Order order)`
``
`Field(Schema.Field field, Schema schema)`
Constructs a new Field instance with the same `name`, `doc`, `defaultValue`, and `order` as `field` has with changing the schema to the specified one.
``
`ReaderUnion(Schema w, Schema r, GenericData d, int firstMatch, Resolver.Action actual)`
``
`SchemaPairCompatibility(SchemaCompatibility.SchemaCompatibilityResult result, Schema reader, Schema writer, String description)`
Constructs a new instance.
``
`SchemaValidationException(Schema reader, Schema writer)`
``
`SchemaValidationException(Schema reader, Schema writer, Throwable cause)`
``
`Skip(Schema w, GenericData d)`
``
`UnresolvedUnionException(Schema unionSchema, Object unresolvedDatum)`
``
`UnresolvedUnionException(Schema unionSchema, Schema.Field field, Object unresolvedDatum)`

## Uses of Schema in org.apache.avro.data

Fields in org.apache.avro.data declared as Schema
Modifier and Type
Field
Description
`static final Schema`
Json.`SCHEMA`
The schema for Json data.
Methods in org.apache.avro.data that return Schema
Modifier and Type
Method
Description
`Schema`
TimeConversions.DateConversion.`getRecommendedSchema()`
`Schema`
TimeConversions.LocalTimestampMicrosConversion.`getRecommendedSchema()`
`Schema`
TimeConversions.LocalTimestampMillisConversion.`getRecommendedSchema()`
`Schema`
TimeConversions.LocalTimestampNanosConversion.`getRecommendedSchema()`
`Schema`
TimeConversions.TimeMicrosConversion.`getRecommendedSchema()`
`Schema`
TimeConversions.TimeMillisConversion.`getRecommendedSchema()`
`Schema`
TimeConversions.TimestampMicrosConversion.`getRecommendedSchema()`
`Schema`
TimeConversions.TimestampMillisConversion.`getRecommendedSchema()`
`Schema`
TimeConversions.TimestampNanosConversion.`getRecommendedSchema()`
`protected final Schema`
RecordBuilderBase.`schema()`
Methods in org.apache.avro.data with parameters of type Schema
Modifier and Type
Method
Description
`LocalDate`
TimeConversions.DateConversion.`fromInt(Integer daysFromEpoch, Schema schema, LogicalType type)`
`LocalTime`
TimeConversions.TimeMillisConversion.`fromInt(Integer millisFromMidnight, Schema schema, LogicalType type)`
`LocalDateTime`
TimeConversions.LocalTimestampMicrosConversion.`fromLong(Long microsFromEpoch, Schema schema, LogicalType type)`
`LocalDateTime`
TimeConversions.LocalTimestampMillisConversion.`fromLong(Long millisFromEpoch, Schema schema, LogicalType type)`
`LocalDateTime`
TimeConversions.LocalTimestampNanosConversion.`fromLong(Long microsFromEpoch, Schema schema, LogicalType type)`
`LocalTime`
TimeConversions.TimeMicrosConversion.`fromLong(Long microsFromMidnight, Schema schema, LogicalType type)`
`Instant`
TimeConversions.TimestampMicrosConversion.`fromLong(Long microsFromEpoch, Schema schema, LogicalType type)`
`Instant`
TimeConversions.TimestampMillisConversion.`fromLong(Long millisFromEpoch, Schema schema, LogicalType type)`
`Instant`
TimeConversions.TimestampNanosConversion.`fromLong(Long microsFromEpoch, Schema schema, LogicalType type)`
`void`
Json.ObjectReader.`setSchema(Schema schema)`
`void`
Json.ObjectWriter.`setSchema(Schema schema)`
`Integer`
TimeConversions.DateConversion.`toInt(LocalDate date, Schema schema, LogicalType type)`
`Integer`
TimeConversions.TimeMillisConversion.`toInt(LocalTime time, Schema schema, LogicalType type)`
`Long`
TimeConversions.LocalTimestampMicrosConversion.`toLong(LocalDateTime timestamp, Schema schema, LogicalType type)`
`Long`
TimeConversions.LocalTimestampMillisConversion.`toLong(LocalDateTime timestamp, Schema schema, LogicalType type)`
`Long`
TimeConversions.LocalTimestampNanosConversion.`toLong(LocalDateTime timestamp, Schema schema, LogicalType type)`
`Long`
TimeConversions.TimeMicrosConversion.`toLong(LocalTime time, Schema schema, LogicalType type)`
`Long`
TimeConversions.TimestampMicrosConversion.`toLong(Instant instant, Schema schema, LogicalType type)`
`Long`
TimeConversions.TimestampMillisConversion.`toLong(Instant timestamp, Schema schema, LogicalType type)`
`Long`
TimeConversions.TimestampNanosConversion.`toLong(Instant instant, Schema schema, LogicalType type)`
Constructors in org.apache.avro.data with parameters of type Schema
Modifier
Constructor
Description
`protected`
`RecordBuilderBase(Schema schema, GenericData data)`
Creates a RecordBuilderBase for building records of the given type.

## Uses of Schema in org.apache.avro.file

Methods in org.apache.avro.file that return Schema
Modifier and Type
Method
Description
`Schema`
DataFileReader12.`getSchema()`
Return the schema used in this file.
`Schema`
DataFileStream.`getSchema()`
Return the schema used in this file.
`Schema`
FileReader.`getSchema()`
Return the schema for data in this file.
Methods in org.apache.avro.file with parameters of type Schema
Modifier and Type
Method
Description
`DataFileWriter<D>`
DataFileWriter.`create(Schema schema, File file)`
Open a new file for data matching a schema with a random sync.
`DataFileWriter<D>`
DataFileWriter.`create(Schema schema, OutputStream outs)`
Open a new file for data matching a schema with a random sync.
`DataFileWriter<D>`
DataFileWriter.`create(Schema schema, OutputStream outs, byte[] sync)`
Open a new file for data matching a schema with an explicit sync.

## Uses of Schema in org.apache.avro.generic

Methods in org.apache.avro.generic that return Schema
Modifier and Type
Method
Description
`protected Schema`
GenericData.`getEnumSchema(Object enu)`
Called to obtain the schema of a enum.
`Schema`
GenericDatumReader.`getExpected()`
Get the reader's schema.
`protected Schema`
GenericData.`getFixedSchema(Object fixed)`
Called to obtain the schema of a fixed.
`protected Schema`
GenericData.`getRecordSchema(Object record)`
Called to obtain the schema of a record.
`Schema`
GenericContainer.`getSchema()`
The schema of this instance.
`Schema`
GenericData.AbstractArray.`getSchema()`
`Schema`
GenericData.EnumSymbol.`getSchema()`
`Schema`
GenericData.Fixed.`getSchema()`
`Schema`
GenericData.Record.`getSchema()`
`Schema`
GenericDatumReader.`getSchema()`
Return the writer's schema.
`Schema`
GenericData.`induce(Object datum)`
Create a schema given an example datum.
Methods in org.apache.avro.generic with parameters of type Schema
Modifier and Type
Method
Description
`int`
GenericData.`compare(Object o1, Object o2, Schema s)`
Compare objects according to their schema.
`protected int`
GenericData.`compare(Object o1, Object o2, Schema s, boolean equals)`
Comparison implementation.
`protected Object`
GenericDatumReader.`convert(Object datum, Schema schema, LogicalType type, Conversion<?> conversion)`
Convert an underlying representation of a logical type (such as a ByteBuffer) to a higher level object (such as a BigDecimal).
`protected <T> Object`
GenericDatumWriter.`convert(Schema schema, LogicalType logicalType, Conversion<T> conversion, Object datum)`
Convert a high level representation of a logical type (such as a BigDecimal) to its underlying representation object (such as a ByteBuffer).
`DatumReader`
GenericData.`createDatumReader(Schema schema)`
Returns a `DatumReader` for this kind of data.
`DatumReader`
GenericData.`createDatumReader(Schema writer, Schema reader)`
Returns a `DatumReader` for this kind of data.
`DatumWriter`
GenericData.`createDatumWriter(Schema schema)`
Returns a `DatumWriter` for this kind of data.
`Object`
GenericData.`createEnum(String symbol, Schema schema)`
Called to create an enum value.
`protected Object`
GenericDatumReader.`createEnum(String symbol, Schema schema)`
Called to create an enum value.
`Object`
GenericData.`createFixed(Object old, byte[] bytes, Schema schema)`
Called to create an fixed value.
`Object`
GenericData.`createFixed(Object old, Schema schema)`
Called to create an fixed value.
`protected Object`
GenericDatumReader.`createFixed(Object old, byte[] bytes, Schema schema)`
Deprecated.
As of Avro 1.6.0 this method has been moved to `GenericData.createFixed(Object, byte[], Schema)`
`protected Object`
GenericDatumReader.`createFixed(Object old, Schema schema)`
Deprecated.
As of Avro 1.6.0 this method has been moved to `GenericData.createFixed(Object, Schema)`
`<T> T`
GenericData.`deepCopy(Schema schema, T value)`
Makes a deep copy of a value given its schema.
`protected Class`
GenericDatumReader.`findStringClass(Schema schema)`
Determines the class to used to represent a string Schema.
`GenericData.InstanceSupplier`
GenericData.`getNewRecordSupplier(Schema schema)`
create a supplier that allows to get new record instances for a given schema in an optimized way
`protected Object`
GenericData.`getRecordState(Object record, Schema schema)`
Produce state for repeated calls to `GenericData.getField(Object,String,int,Object)` and `GenericData.setField(Object,String,int,Object,Object)` on the same record.
`protected final ResolvingDecoder`
GenericDatumReader.`getResolver(Schema actual, Schema expected)`
Gets a resolving decoder for use by this GenericDatumReader.
`int`
GenericData.`hashCode(Object o, Schema s)`
Compute a hash code according to a schema, consistent with `GenericData.compare(Object,Object,Schema)`.
`protected boolean`
GenericData.`instanceOf(Schema schema, Object datum)`
Called by `GenericData.resolveUnion(Schema,Object)`.
`Object`
GenericData.`newArray(Object old, int size, Schema schema)`
`protected Object`
GenericDatumReader.`newArray(Object old, int size, Schema schema)`
Called to create new array instances.
`Object`
GenericData.InstanceSupplier.`newInstance(Object oldInstance, Schema schema)`
`Object`
GenericData.`newRecord(Object old, Schema schema)`
Called to create new record instances.
`protected Object`
GenericDatumReader.`newRecord(Object old, Schema schema)`
Deprecated.
As of Avro 1.6.0 this method has been moved to `GenericData.newRecord(Object, Schema)`
`protected Object`
GenericDatumReader.`read(Object old, Schema expected, ResolvingDecoder in)`
Called to read data.
`protected Object`
GenericDatumReader.`readArray(Object old, Schema expected, ResolvingDecoder in)`
Called to read an array instance.
`protected Object`
GenericDatumReader.`readBytes(Object old, Schema s, Decoder in)`
Called to read byte arrays.
`protected Object`
GenericDatumReader.`readEnum(Schema expected, Decoder in)`
Called to read an enum value.
`protected Object`
GenericDatumReader.`readFixed(Object old, Schema expected, Decoder in)`
Called to read a fixed value.
`protected Object`
GenericDatumReader.`readInt(Object old, Schema expected, Decoder in)`
Called to read integers.
`protected Object`
GenericDatumReader.`readMap(Object old, Schema expected, ResolvingDecoder in)`
Called to read a map instance.
`protected Object`
GenericDatumReader.`readMapKey(Object old, Schema expected, Decoder in)`
Called by the default implementation of `GenericDatumReader.readMap(java.lang.Object, org.apache.avro.Schema, org.apache.avro.io.ResolvingDecoder)` to read a key value.
`protected Object`
GenericDatumReader.`readRecord(Object old, Schema expected, ResolvingDecoder in)`
Called to read a record instance.
`protected Object`
GenericDatumReader.`readString(Object old, Schema expected, Decoder in)`
Called to read strings.
`protected Object`
GenericDatumReader.`readWithConversion(Object old, Schema expected, LogicalType logicalType, Conversion<?> conversion, ResolvingDecoder in)`
`protected Object`
GenericDatumReader.`readWithoutConversion(Object old, Schema expected, ResolvingDecoder in)`
`int`
GenericData.`resolveUnion(Schema union, Object datum)`
Return the index for a datum within a union.
`protected int`
GenericDatumWriter.`resolveUnion(Schema union, Object datum)`
Called to find the index for a datum within a union.
`void`
GenericDatumReader.`setExpected(Schema reader)`
Set the reader's schema.
`protected void`
GenericData.Fixed.`setSchema(Schema schema)`
`void`
GenericDatumReader.`setSchema(Schema writer)`
`void`
GenericDatumWriter.`setSchema(Schema root)`
`static void`
GenericData.`setStringType(Schema s, GenericData.StringType stringType)`
Set the Java type to be used when reading this schema.
`static void`
GenericDatumReader.`skip(Schema schema, Decoder in)`
Skip an instance of a schema.
`boolean`
GenericData.`validate(Schema schema, Object datum)`
Returns true if a Java datum matches a schema.
`protected void`
GenericDatumWriter.`write(Schema schema, Object datum, Encoder out)`
Called to write data.
`protected void`
GenericDatumWriter.`writeArray(Schema schema, Object datum, Encoder out)`
Called to write a array.
`protected void`
GenericDatumWriter.`writeEnum(Schema schema, Object datum, Encoder out)`
Called to write an enum value.
`protected void`
GenericDatumWriter.`writeFixed(Schema schema, Object datum, Encoder out)`
Called to write a fixed value.
`protected void`
GenericDatumWriter.`writeMap(Schema schema, Object datum, Encoder out)`
Called to write a map.
`protected void`
GenericDatumWriter.`writeRecord(Schema schema, Object datum, Encoder out)`
Called to write a record.
`protected void`
GenericDatumWriter.`writeString(Schema schema, Object datum, Encoder out)`
Called to write a string.
`protected void`
GenericDatumWriter.`writeWithoutConversion(Schema schema, Object datum, Encoder out)`
Called to write data.
Constructors in org.apache.avro.generic with parameters of type Schema
Modifier
Constructor
Description
``
`AbstractArray(Schema schema)`
``
`Array(int capacity, Schema schema)`
``
`Array(Schema schema, Collection<T> c)`
``
`BooleanArray(int capacity, Schema schema)`
``
`BooleanArray(Schema schema, Collection<Boolean> c)`
``
`DoubleArray(int capacity, Schema schema)`
``
`DoubleArray(Schema schema, Collection<Double> c)`
``
`EnumSymbol(Schema schema, Object symbol)`
Maps existing Objects into an Avro enum by calling toString(), eg for Java Enums
``
`EnumSymbol(Schema schema, String symbol)`
``
`Fixed(Schema schema)`
``
`Fixed(Schema schema, byte[] bytes)`
``
`FloatArray(int capacity, Schema schema)`
``
`FloatArray(Schema schema, Collection<Float> c)`
``
`GenericDatumReader(Schema schema)`
Construct where the writer's and reader's schemas are the same.
``
`GenericDatumReader(Schema writer, Schema reader)`
Construct given writer's and reader's schema.
``
`GenericDatumReader(Schema writer, Schema reader, GenericData data)`
``
`GenericDatumWriter(Schema root)`
``
`GenericDatumWriter(Schema root, GenericData data)`
``
`GenericRecordBuilder(Schema schema)`
Creates a GenericRecordBuilder for building Record instances.
``
`IntArray(int capacity, Schema schema)`
``
`IntArray(Schema schema, Collection<Integer> c)`
``
`LongArray(int capacity, Schema schema)`
``
`LongArray(Schema schema, Collection<Long> c)`
``
`Record(Schema schema)`

## Uses of Schema in org.apache.avro.io

Methods in org.apache.avro.io with parameters of type Schema
Modifier and Type
Method
Description
`static int`
BinaryData.`compare(byte[] b1, int s1, byte[] b2, int s2, Schema schema)`
Compare binary encoded data.
`static int`
BinaryData.`compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2, Schema schema)`
Compare binary encoded data.
`<D> DatumReader<D>`
FastReaderBuilder.`createDatumReader(Schema schema)`
`<D> DatumReader<D>`
FastReaderBuilder.`createDatumReader(Schema writerSchema, Schema readerSchema)`
`void`
FastReaderBuilder.RecordReader.`finishInitialization(FastReaderBuilder.ExecutionStep[] readSteps, Schema schema, GenericData.InstanceSupplier supp)`
`static int`
BinaryData.`hashCode(byte[] bytes, int start, int length, Schema schema)`
Hash binary encoded data.
`JsonDecoder`
DecoderFactory.`jsonDecoder(Schema schema, InputStream input)`
Creates a `JsonDecoder` using the InputStream provided for reading data that conforms to the Schema provided.
`JsonDecoder`
DecoderFactory.`jsonDecoder(Schema schema, String input)`
Creates a `JsonDecoder` using the String provided for reading data that conforms to the Schema provided.
`JsonEncoder`
EncoderFactory.`jsonEncoder(Schema schema, OutputStream out)`
Creates a `JsonEncoder` using the OutputStream provided for writing data conforming to the Schema provided.
`JsonEncoder`
EncoderFactory.`jsonEncoder(Schema schema, OutputStream out, boolean pretty)`
Creates a `JsonEncoder` using the OutputStream provided for writing data conforming to the Schema provided with optional pretty printing.
`JsonEncoder`
EncoderFactory.`jsonEncoder(Schema schema, OutputStream out, boolean pretty, boolean autoflush)`
Creates a `JsonEncoder` using the OutputStream provided for writing data conforming to the Schema provided with optional pretty printing.
`static Object`
ResolvingDecoder.`resolve(Schema writer, Schema reader)`
Produces an opaque resolver that can be used to construct a new `ResolvingDecoder(Object, Decoder)`.
`ResolvingDecoder`
DecoderFactory.`resolvingDecoder(Schema writer, Schema reader, Decoder wrapped)`
Creates a `ResolvingDecoder` wrapping the Decoder provided.
`void`
DatumReader.`setSchema(Schema schema)`
Set the writer's schema.
`void`
DatumWriter.`setSchema(Schema schema)`
Set the schema.
`default void`
FastReaderBuilder.FieldReader.`setSchema(Schema schema)`
`ValidatingDecoder`
DecoderFactory.`validatingDecoder(Schema schema, Decoder wrapped)`
Creates a `ValidatingDecoder` wrapping the Decoder provided.
`ValidatingEncoder`
EncoderFactory.`validatingEncoder(Schema schema, Encoder encoder)`
Creates a `ValidatingEncoder` that wraps the Encoder provided.

## Uses of Schema in org.apache.avro.io.parsing

Methods in org.apache.avro.io.parsing with parameters of type Schema
Modifier and Type
Method
Description
`static void`
ResolvingGrammarGenerator.`encode(Encoder e, Schema s, com.fasterxml.jackson.databind.JsonNode n)`
Encodes the given Json node `n` on to the encoder `e` according to the schema `s`.
`Symbol`
JsonGrammarGenerator.`generate(Schema schema)`
Returns the non-terminal that is the start symbol for the grammar for the grammar for the given schema `sc`.
`Symbol`
JsonGrammarGenerator.`generate(Schema sc, Map<org.apache.avro.io.parsing.ValidatingGrammarGenerator.LitS,Symbol> seen)`
Returns the non-terminal that is the start symbol for grammar of the given schema `sc`.
`final Symbol`
ResolvingGrammarGenerator.`generate(Schema writer, Schema reader)`
Resolves the writer schema `writer` and the reader schema `reader` and returns the start symbol for the grammar generated.
`Symbol`
ValidatingGrammarGenerator.`generate(Schema schema)`
Returns the non-terminal that is the start symbol for the grammar for the given schema `sc`.
`Symbol`
ValidatingGrammarGenerator.`generate(Schema sc, Map<org.apache.avro.io.parsing.ValidatingGrammarGenerator.LitS,Symbol> seen)`
Returns the non-terminal that is the start symbol for the grammar for the given schema `sc`.

## Uses of Schema in org.apache.avro.message

Methods in org.apache.avro.message that return Schema
Modifier and Type
Method
Description
`Schema`
SchemaStore.Cache.`findByFingerprint(long fingerprint)`
`Schema`
SchemaStore.`findByFingerprint(long fingerprint)`
Retrieves a fingerprint by its AVRO-CRC-64 fingerprint.
Methods in org.apache.avro.message with parameters of type Schema
Modifier and Type
Method
Description
`void`
BinaryMessageDecoder.`addSchema(Schema writeSchema)`
Adds a `Schema` that can be used to decode buffers.
`void`
SchemaStore.Cache.`addSchema(Schema schema)`
Adds a schema to this cache that can be retrieved using its AVRO-CRC-64 fingerprint.
Constructors in org.apache.avro.message with parameters of type Schema
Modifier
Constructor
Description
``
`BinaryMessageDecoder(GenericData model, Schema readSchema)`
Creates a new `BinaryMessageEncoder` that uses the given `data model` to construct datum instances described by the `schema`.
``
`BinaryMessageDecoder(GenericData model, Schema readSchema, SchemaStore resolver)`
Creates a new `BinaryMessageEncoder` that uses the given `data model` to construct datum instances described by the `schema`.
``
`BinaryMessageEncoder(GenericData model, Schema schema)`
Creates a new `BinaryMessageEncoder` that uses the given `data model` to deconstruct datum instances described by the `schema`.
``
`BinaryMessageEncoder(GenericData model, Schema schema, boolean shouldCopy)`
Creates a new `BinaryMessageEncoder` that uses the given `data model` to deconstruct datum instances described by the `schema`.
``
`RawMessageDecoder(GenericData model, Schema schema)`
Creates a new `RawMessageDecoder` that uses the given `data model` to construct datum instances described by the `schema`.
``
`RawMessageDecoder(GenericData model, Schema writeSchema, Schema readSchema)`
Creates a new `RawMessageDecoder` that uses the given `data model` to construct datum instances described by the `readSchema`.
``
`RawMessageEncoder(GenericData model, Schema schema)`
Creates a new `RawMessageEncoder` that uses the given `data model` to deconstruct datum instances described by the `schema`.
``
`RawMessageEncoder(GenericData model, Schema schema, boolean shouldCopy)`
Creates a new `RawMessageEncoder` that uses the given `data model` to deconstruct datum instances described by the `schema`.

## Uses of Schema in org.apache.avro.path

Methods in org.apache.avro.path with parameters of type Schema
Modifier and Type
Method
Description
`T`
PathTracingException.`summarize(Schema root)`
produces a user-facing exception to be thrown back out to user code
`AvroTypeException`
TracingAvroTypeException.`summarize(Schema root)`
`ClassCastException`
TracingClassCastException.`summarize(Schema root)`
`NullPointerException`
TracingNullPointException.`summarize(Schema root)`
Constructors in org.apache.avro.path with parameters of type Schema
Modifier
Constructor
Description
``
`TracingClassCastException(ClassCastException cause, Object datum, Schema expected, boolean customCoderUsed)`
``
`TracingNullPointException(NullPointerException cause, Schema expected, boolean customCoderUsed)`

## Uses of Schema in org.apache.avro.reflect

Fields in org.apache.avro.reflect declared as Schema
Modifier and Type
Field
Description
`protected Schema`
CustomEncoding.`schema`
Methods in org.apache.avro.reflect that return Schema
Modifier and Type
Method
Description
`protected Schema`
ReflectData.AllowNull.`createFieldSchema(Field field, Map<String,Schema> names)`
`protected Schema`
ReflectData.`createFieldSchema(Field field, Map<String,Schema> names)`
Create a schema for a field.
`protected Schema`
ReflectData.`createSchema(Type type, Map<String,Schema> names)`
`protected Schema`
ReflectData.`getRecordSchema(Object record)`
`protected Schema`
CustomEncoding.`getSchema()`
`static Schema`
ReflectData.`makeNullable(Schema schema)`
Create and return a union of the null schema and the provided schema.
Methods in org.apache.avro.reflect with parameters of type Schema
Modifier and Type
Method
Description
`protected int`
ReflectData.`compare(Object o1, Object o2, Schema s, boolean equals)`
`DatumReader`
ReflectData.`createDatumReader(Schema schema)`
`DatumReader`
ReflectData.`createDatumReader(Schema writer, Schema reader)`
`DatumWriter`
ReflectData.`createDatumWriter(Schema schema)`
`Object`
ReflectData.`createFixed(Object old, Schema schema)`
`protected Object`
ReflectData.`createSchemaDefaultValue(Type type, Field field, Schema fieldSchema)`
Get default value for a schema field.
`Class`
ReflectData.`getClass(Schema schema)`
`protected Object`
ReflectData.`getRecordState(Object record, Schema schema)`
`static Schema`
ReflectData.`makeNullable(Schema schema)`
Create and return a union of the null schema and the provided schema.
`protected Object`
ReflectDatumReader.`newArray(Object old, int size, Schema schema)`
`Object`
ReflectData.`newRecord(Object old, Schema schema)`
`protected Object`
ReflectDatumReader.`readArray(Object old, Schema expected, ResolvingDecoder in)`
`protected Object`
ReflectDatumReader.`readBytes(Object old, Schema s, Decoder in)`
`protected Object`
ReflectDatumReader.`readInt(Object old, Schema expected, Decoder in)`
`boolean`
ReflectData.`validate(Schema schema, Object datum)`
`protected void`
ReflectDatumWriter.`write(Schema schema, Object datum, Encoder out)`
`protected void`
ReflectDatumWriter.`writeArray(Schema schema, Object datum, Encoder out)`
Called to write a array.
Method parameters in org.apache.avro.reflect with type arguments of type Schema
Modifier and Type
Method
Description
`protected Schema`
ReflectData.AllowNull.`createFieldSchema(Field field, Map<String,Schema> names)`
`protected Schema`
ReflectData.`createFieldSchema(Field field, Map<String,Schema> names)`
Create a schema for a field.
`protected Schema`
ReflectData.`createSchema(Type type, Map<String,Schema> names)`
Constructors in org.apache.avro.reflect with parameters of type Schema
Modifier
Constructor
Description
``
`ReflectDatumReader(Schema root)`
Construct where the writer's and reader's schemas are the same.
``
`ReflectDatumReader(Schema writer, Schema reader)`
Construct given writer's and reader's schema.
``
`ReflectDatumReader(Schema writer, Schema reader, ReflectData data)`
Construct given writer's and reader's schema and the data model.
``
`ReflectDatumWriter(Schema root)`
``
`ReflectDatumWriter(Schema root, ReflectData reflectData)`

## Uses of Schema in org.apache.avro.specific

Methods in org.apache.avro.specific that return Schema
Modifier and Type
Method
Description
`protected Schema`
SpecificData.`createSchema(Type type, Map<String,Schema> names)`
Create the schema for a Java type.
`protected Schema`
SpecificData.`getEnumSchema(Object datum)`
`Schema`
SpecificData.`getSchema(Type type)`
Find the schema for a Java type.
`abstract Schema`
SpecificExceptionBase.`getSchema()`
`abstract Schema`
SpecificFixed.`getSchema()`
Methods in org.apache.avro.specific with parameters of type Schema
Modifier and Type
Method
Description
`protected int`
SpecificData.`compare(Object o1, Object o2, Schema s, boolean eq)`
`DatumReader`
SpecificData.`createDatumReader(Schema schema)`
`DatumReader`
SpecificData.`createDatumReader(Schema writer, Schema reader)`
`DatumWriter`
SpecificData.`createDatumWriter(Schema schema)`
`Object`
SpecificData.`createEnum(String symbol, Schema schema)`
`Object`
SpecificData.`createFixed(Object old, Schema schema)`
`protected Class`
SpecificDatumReader.`findStringClass(Schema schema)`
`Class`
SpecificData.`getClass(Schema schema)`
Return the class that implements a schema, or null if none exists.
`static String`
SpecificData.`getClassName(Schema schema)`
Returns the Java class name indicated by a schema's name and namespace.
`static SpecificData`
SpecificData.`getForSchema(Schema reader)`
For RECORD and UNION type schemas, this method returns the SpecificData instance of the class associated with the schema, in order to get the right conversions for any logical types used.
`GenericData.InstanceSupplier`
SpecificData.`getNewRecordSupplier(Schema schema)`
`static Object`
SpecificData.`newInstance(Class c, Schema s)`
Create an instance of a class.
`Object`
SpecificData.`newRecord(Object old, Schema schema)`
`protected Object`
SpecificDatumReader.`readRecord(Object old, Schema expected, ResolvingDecoder in)`
`void`
SpecificDatumReader.`setSchema(Schema actual)`
`protected void`
SpecificDatumWriter.`writeEnum(Schema schema, Object datum, Encoder out)`
`protected void`
SpecificDatumWriter.`writeRecord(Schema schema, Object datum, Encoder out)`
`protected void`
SpecificDatumWriter.`writeString(Schema schema, Object datum, Encoder out)`
Method parameters in org.apache.avro.specific with type arguments of type Schema
Modifier and Type
Method
Description
`protected Schema`
SpecificData.`createSchema(Type type, Map<String,Schema> names)`
Create the schema for a Java type.
Constructors in org.apache.avro.specific with parameters of type Schema
Modifier
Constructor
Description
``
`SpecificDatumReader(Schema schema)`
Construct where the writer's and reader's schemas are the same.
``
`SpecificDatumReader(Schema writer, Schema reader)`
Construct given writer's and reader's schema.
``
`SpecificDatumReader(Schema writer, Schema reader, SpecificData data)`
Construct given writer's schema, reader's schema, and a `SpecificData`.
``
`SpecificDatumWriter(Schema schema)`
``
`SpecificDatumWriter(Schema root, SpecificData specificData)`
`protected`
`SpecificErrorBuilderBase(Schema schema)`
Creates a SpecificErrorBuilderBase for building errors of the given type.
`protected`
`SpecificErrorBuilderBase(Schema schema, SpecificData model)`
Creates a SpecificErrorBuilderBase for building errors of the given type.
`protected`
`SpecificRecordBuilderBase(Schema schema)`
Creates a SpecificRecordBuilderBase for building records of the given type.
`protected`
`SpecificRecordBuilderBase(Schema schema, SpecificData model)`
Creates a SpecificRecordBuilderBase for building records of the given type.

## Uses of Schema in org.apache.avro.util

Methods in org.apache.avro.util that return Schema
Modifier and Type
Method
Description
`Schema`
SchemaResolver.ResolvingVisitor.`getResolved(Schema schema)`
`static Schema`
SchemaResolver.`unresolvedSchema(String name)`
Create a schema to represent an "unresolved" schema.
Methods in org.apache.avro.util with parameters of type Schema
Modifier and Type
Method
Description
`SchemaVisitor.SchemaVisitorAction`
SchemaResolver.IsResolvedSchemaVisitor.`afterVisitNonTerminal(Schema nonTerminal)`
`SchemaVisitor.SchemaVisitorAction`
SchemaResolver.ResolvingVisitor.`afterVisitNonTerminal(Schema nt)`
`SchemaVisitor.SchemaVisitorAction`
SchemaVisitor.`afterVisitNonTerminal(Schema nonTerminal)`
Invoked for schemas with children after its children have been visited.
`void`
SchemaResolver.ResolvingVisitor.`copyProperties(Schema first, Schema second)`
`static String`
SchemaUtil.`describe(Schema schema)`
`Schema`
SchemaResolver.ResolvingVisitor.`getResolved(Schema schema)`
`static String`
SchemaResolver.`getUnresolvedSchemaName(Schema schema)`
Get the unresolved schema name.
`static boolean`
SchemaResolver.`isFullyResolvedSchema(Schema schema)`
Is this an unresolved schema?
`static boolean`
SchemaResolver.`isUnresolvedSchema(Schema schema)`
Is this an unresolved schema.
`static <T> T`
Schemas.`visit(Schema start, SchemaVisitor<T> visitor)`
Depth first visit.
`SchemaVisitor.SchemaVisitorAction`
SchemaResolver.IsResolvedSchemaVisitor.`visitNonTerminal(Schema nonTerminal)`
`SchemaVisitor.SchemaVisitorAction`
SchemaResolver.ResolvingVisitor.`visitNonTerminal(Schema nt)`
`SchemaVisitor.SchemaVisitorAction`
SchemaVisitor.`visitNonTerminal(Schema nonTerminal)`
Invoked for schema with children before proceeding to visit the children.
`SchemaVisitor.SchemaVisitorAction`
SchemaResolver.IsResolvedSchemaVisitor.`visitTerminal(Schema terminal)`
`SchemaVisitor.SchemaVisitorAction`
SchemaResolver.ResolvingVisitor.`visitTerminal(Schema terminal)`
`SchemaVisitor.SchemaVisitorAction`
SchemaVisitor.`visitTerminal(Schema terminal)`
Invoked for schemas that do not have "child" schemas (like string, int …) or for a previously encountered schema with children, which will be treated as a terminal.
Constructors in org.apache.avro.util with parameters of type Schema
Modifier
Constructor
Description
``
`RandomData(GenericData genericData, Schema schema, int count)`
``
`RandomData(GenericData genericData, Schema schema, int count, boolean utf8ForString)`
``
`RandomData(GenericData genericData, Schema schema, int count, long seed)`
``
`RandomData(GenericData genericData, Schema schema, int count, long seed, boolean utf8ForString)`
``
`RandomData(Schema schema, int count)`
``
`RandomData(Schema schema, int count, boolean utf8ForString)`
``
`RandomData(Schema schema, int count, long seed)`
``
`RandomData(Schema schema, int count, long seed, boolean utf8ForString)`
Constructor parameters in org.apache.avro.util with type arguments of type Schema
Modifier
Constructor
Description
``
`ResolvingVisitor(Function<String,Schema> symbolTable)`