Package htsjdk.samtools.util

# Interface LineReader

All Superinterfaces:
  `AutoCloseable`, `Closeable`

All Known Implementing Classes:
  `BufferedLineReader`, `StringLineReader`

public interface LineReader extends Closeable
Interface allows for implementations that read lines from a String, an ASCII file, or somewhere else.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`EOF_VALUE`

## Method Summary

Modifier and Type
Method
Description
`void`
`close()`
`int`
`getLineNumber()`
`int`
`peek()`
Non-destructive one-character look-ahead.
`String`
`readLine()`
Read a line and remove the line terminator

## Field Details

### EOF_VALUE

static final int EOF_VALUE

See Also:
  - Constant Field Values

## Method Details

### readLine

String readLine()
Read a line and remove the line terminator

Returns:
  the line read, or null if EOF has been reached.

### getLineNumber

int getLineNumber()

Returns:
  1-based number of line most recently read

### peek

int peek()
Non-destructive one-character look-ahead.

Returns:
  If not eof, the next character that would be read. If eof, -1.

### close

void close()

Specified by:
  `close` in interface `AutoCloseable`
Specified by:
  `close` in interface `Closeable`