Class MetaserverEntryParser


  • public class MetaserverEntryParser
    extends java.lang.Object
    Parser for response lines of metaserver response lines.
    • Constructor Detail

      • MetaserverEntryParser

        public MetaserverEntryParser()
        Creates a new instance.
    • Method Detail

      • parseEntry

        @Nullable
        public static @Nullable MetaserverEntry parseEntry​(@NotNull
                                                           @NotNull java.lang.CharSequence entry)
        Parses a metaserver response line.
        Parameters:
        entry - the response line to parse
        Returns:
        the metaserver entry or null if the line is invalid
      • parseLine

        @Nullable
        public @Nullable MetaserverEntry parseLine​(@NotNull
                                                   @NotNull java.lang.String line)
                                            throws java.io.IOException
        Parses a metaserver response line.
        Parameters:
        line - the response line to parse
        Returns:
        the metaserver entry, or null if the line is invalid
        Throws:
        java.io.IOException - if the response line is invalid
      • format

        @NotNull
        public static @NotNull java.lang.String format​(@NotNull
                                                       @NotNull MetaserverEntry entry)
        Formats a metaserver entry that returns the metaserver entry when parse with parseEntry(CharSequence).
        Parameters:
        entry - the metaserver entry to format
        Returns:
        the formatted entry