Interface DescriptorParser


  • public interface DescriptorParser
    Descriptor source that parses descriptors from raw descriptor contents.

    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.

    Since:
    1.0.0
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method 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.
    • Method Detail

      • parseDescriptors

        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.
        Parameters:
        rawDescriptorBytes - Raw descriptor bytes containing one or more descriptors
        sourceFile - 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
        Returns:
        Parsed/unparseable descriptors
        Since:
        1.9.0