Class StructIterator

java.lang.Object
org.apache.hadoop.hbase.types.StructIterator
All Implemented Interfaces:
Iterator<Object>

@Public public class StructIterator extends Object implements Iterator<Object>
An Iterator over encoded Struct members.

This iterates over each serialized Struct field from the specified DataTypes<?>[] definition. It allows you to read the field or skip over its serialized bytes using next() and skip(), respectively. This is in contrast to the Struct method which allow you to Struct.decode(PositionedByteRange) or Struct.skip(PositionedByteRange) over the entire Struct at once.

This iterator may also be used to read bytes from any Struct for which the specified DataType<?>[] is a prefix. For example, if the specified Struct definition has a RawInteger and a RawStringTerminated field, you may parse the serialized output of a Struct whose fields are RawInteger, RawStringTerminated, and RawBytes. The iterator would return a number followed by a String. The trailing byte[] would be ignored.