FileLocation (Mibble 2.9.4 Documentation)
Date: 2016-09-27

net.percederberg.mibble

## Class FileLocation

- java.lang.Object
- - net.percederberg.mibble.FileLocation

-     public class FileLocation
      extends java.lang.Object

  A file location. This class contains a reference to an exact location inside a text file.
  Since:
    2.0

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FileLocation(java.io.File file)` Creates a new file location without an exact line or column reference.
    `FileLocation(java.io.File file, int line, int column)` Creates a new file location.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getColumnNumber()` Returns the column number.
    `java.io.File` | `getFile()` Returns the file name.
    `int` | `getLineNumber()` Returns the line number.
    `java.lang.String` | `readLine()` Reads the specified line from the file.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FileLocation

          public FileLocation(java.io.File file)

      Creates a new file location without an exact line or column reference.
      Parameters:
        `file` - the file name

    - #### FileLocation

          public FileLocation(java.io.File file,
                              int line,
                              int column)

      Creates a new file location.
      Parameters:
        `file` - the file name
        `line` - the line number
        `column` - the column number

  - ### Method Detail

    - #### getFile

          public java.io.File getFile()

      Returns the file name.
      Returns:
        the file name

    - #### getLineNumber

          public int getLineNumber()

      Returns the line number.
      Returns:
        the line number

    - #### getColumnNumber

          public int getColumnNumber()

      Returns the column number.
      Returns:
        the column number

    - #### readLine

          public java.lang.String readLine()

      Reads the specified line from the file. If the file couldn't be opened or read correctly, null will be returned. The line will NOT contain the terminating '\n' character. This method takes special care to only count the linefeed (LF, 0x0A) character as a valid newline.
      Returns:
        the line read, or null if not found