public static interface Record.StructuredReader
Metadata
.
Such a reader may be created using Record.newReader(MRecord)
.
The reader will validate record content against the metadata allowing a
zero length string in any field. If a different empty field value is to
be permitted as well as zero length string (which typically indicates 'no
change' in a field), create the builder using
Record.newReader(MRecord, String)
.
String get(String name) throws IllegalArgumentException, MetadataViolationException
This can only be used for a non repeating field.
name
- the field nameIllegalArgumentException
- if name
is nullMetadataViolationException
- if the metadata does not define a
field of the given name or the named field is a repeating
fieldString get(String name, int index) throws IllegalArgumentException, IndexOutOfBoundsException, MetadataViolationException
This can only be used for a field that is declared as repeating.
name
- the name of the fieldindex
- the index of the field occurrence to return the value
forIllegalArgumentException
- if name
is nullIndexOutOfBoundsException
- if index
is out of boundsMetadataViolationException
- if the named field is not declared
by the metadata or the specified index
is
incompatible with the field multiplicityList<String> getValues(String name) throws IllegalArgumentException, MetadataViolationException
name
- the field nameIllegalArgumentException
- if name
is nullMetadataViolationException
- if no field matching name
is defined in the metadataCopyright © 2016 Push Technology Ltd. All Rights Reserved.