Class EscapeUtils

java.lang.Object
org.apache.jackrabbit.oak.commons.sort.EscapeUtils

public abstract class EscapeUtils extends Object
Utility class to escape '\n', '\r', '\' char while being written to file and unescape then upon getting read from file. This is used by StringSort and ExternalSort to handle data which contains line break. If left unescaped then such data interferes with the processing of such utilities
  • Constructor Details

    • EscapeUtils

      public EscapeUtils()
  • Method Details

    • escapeLineBreak

      public static String escapeLineBreak(@Nullable @Nullable String line)
    • unescapeLineBreaks

      public static String unescapeLineBreaks(@Nullable @Nullable String line)