Class MetaserverEntryParser

java.lang.Object
com.realtime.crossfire.jxclient.metaserver.MetaserverEntryParser

public class MetaserverEntryParser extends Object
Parser for response lines of metaserver response lines.
  • Constructor Details

    • MetaserverEntryParser

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

    • parseEntry

      @Nullable public static @Nullable MetaserverEntry parseEntry(@NotNull @NotNull 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 String line) throws 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:
      IOException - if the response line is invalid
    • format

      @NotNull public static @NotNull 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