Package org.springframework.shell.core
Class FileInputProvider
java.lang.Object
org.springframework.shell.core.FileInputProvider
- All Implemented Interfaces:
AutoCloseable,InputProvider
An
InputProvider that reads input from a file.
Supports backslashes at end of line to signal line continuation.
- Author:
- Eric Bottard, Piotr Olaszewski, Mahmoud Ben Hassine
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
FileInputProvider
Create a newFileInputProviderinstance.- Parameters:
file- the file to read input from- Throws:
FileNotFoundException- if the file does not exist
-
-
Method Details
-
readInput
Description copied from interface:InputProviderReturn text entered by user to invoke commands.- Specified by:
readInputin interfaceInputProvider- Returns:
- user input line or null if end of input is reached
- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-