org.overlord.sramp.shell
Class FileShellCommandReader

java.lang.Object
  extended by org.overlord.sramp.shell.AbstractShellCommandReader
      extended by org.overlord.sramp.shell.FileShellCommandReader
All Implemented Interfaces:
ShellCommandReader

public class FileShellCommandReader
extends AbstractShellCommandReader

An implementation of the ShellCommandReader that reads data from a file.

Author:
eric.wittmann@redhat.com

Constructor Summary
FileShellCommandReader(ShellCommandFactory factory, ShellContextImpl context, String filePath)
          Constructor.
 
Method Summary
 void close()
          Called by the shell when exiting.
 void open()
          Called to open the shell command reader.
protected  String readLine()
          Reads a single line from the input source (e.g.
 
Methods inherited from class org.overlord.sramp.shell.AbstractShellCommandReader
getCommandOutput, getContext, getFactory, read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileShellCommandReader

public FileShellCommandReader(ShellCommandFactory factory,
                              ShellContextImpl context,
                              String filePath)
Constructor.

Parameters:
factory -
context -
filePath -
Method Detail

open

public void open()
          throws IOException
Description copied from interface: ShellCommandReader
Called to open the shell command reader.

Specified by:
open in interface ShellCommandReader
Specified by:
open in class AbstractShellCommandReader
Throws:
IOException
See Also:
org.overlord.sramp.common.shell.AbstractShellCommandReader#open()

readLine

protected String readLine()
                   throws IOException
Description copied from class: AbstractShellCommandReader
Reads a single line from the input source (e.g. user input) and returns it.

Specified by:
readLine in class AbstractShellCommandReader
Throws:
IOException
See Also:
org.overlord.sramp.common.shell.AbstractShellCommandReader#readLine()

close

public void close()
           throws IOException
Description copied from interface: ShellCommandReader
Called by the shell when exiting.

Specified by:
close in interface ShellCommandReader
Overrides:
close in class AbstractShellCommandReader
Throws:
IOException
See Also:
org.overlord.sramp.common.shell.ShellCommandReader#close()


Copyright © 2011-2013 JBoss, a division of Red Hat. All Rights Reserved.