Class ColumnFileReader

java.lang.Object
net.fabricmc.mappingio.format.ColumnFileReader
All Implemented Interfaces:
Closeable, AutoCloseable

@Internal public final class ColumnFileReader extends Object implements Closeable
  • Constructor Details

    • ColumnFileReader

      public ColumnFileReader(Reader reader, char columnSeparator)
  • Method Details

    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException
    • nextCol

      public boolean nextCol(String expect) throws IOException
      Try to read the current column with specific expected content.

      The reader will point to the next column or end of line if successful, otherwise remains unchanged.

      Parameters:
      expect - content to expect
      Returns:
      true if the column was read and had the expected content, false otherwise
      Throws:
      IOException
    • nextCol

      @Nullable public @Nullable String nextCol() throws IOException
      Read and consume a column without unescaping.
      Throws:
      IOException
    • nextEscapedCol

      @Nullable public @Nullable String nextEscapedCol() throws IOException
      Read and consume a column with unescaping.
      Throws:
      IOException
    • nextCol

      @Nullable public @Nullable String nextCol(boolean unescape) throws IOException
      Read and consume a column and unescape it if requested.
      Throws:
      IOException
    • nextCols

      @Nullable public @Nullable String nextCols(boolean unescape) throws IOException
      Read and consume all column until eol and unescape if requested.
      Throws:
      IOException
    • nextIntCol

      public int nextIntCol() throws IOException
      Read and consume a column and convert it to integer.
      Throws:
      IOException
    • nextLine

      public boolean nextLine(int indent) throws IOException
      Throws:
      IOException
    • hasExtraIndents

      public boolean hasExtraIndents() throws IOException
      Throws:
      IOException
    • getLineNumber

      public int getLineNumber()
    • isAtEof

      public boolean isAtEof()
    • mark

      public void mark()
    • reset

      public void reset()