public interface DescriptorParser
Unlike most of the other descriptor sources this descriptor source does not operate in a batch-processing mode. It takes the raw descriptor contents of one or more descriptors, parses them, and returns a list of descriptors.
This descriptor source is internally used by other descriptor sources but can also be used directly by applications that obtain raw descriptor contents via other means than one of the existing descriptor sources.
Modifier and Type | Method and Description |
---|---|
java.lang.Iterable<Descriptor> |
parseDescriptors(byte[] rawDescriptorBytes,
java.io.File sourceFile,
java.lang.String fileName)
Parse descriptors in the given byte array and return the parsed/unparseable
descriptors.
|
java.lang.Iterable<Descriptor> parseDescriptors(byte[] rawDescriptorBytes, java.io.File sourceFile, java.lang.String fileName)
rawDescriptorBytes
- Raw descriptor bytes containing one or more
descriptorssourceFile
- Optional descriptor source file reference, e.g., the name
of a tar file that contains descriptors, included in parsed/unparseable
descriptors.fileName
- Proper file name for the descriptor used as a parser hint,
publication time of some descriptor types