de.dante.extex.main.queryFile
Class QueryFileHandlerTeXImpl

java.lang.Object
  extended byde.dante.extex.main.queryFile.QueryFileHandlerTeXImpl
All Implemented Interfaces:
QueryFileHandler

public class QueryFileHandlerTeXImpl
extends java.lang.Object
implements QueryFileHandler

This class implements the TeX version of a query file handler. It presents a prompt to the user (**) and reads a file name from the console.

If the file name starts with a backslash then it is prepended to the code to be executed. and no file name is returned.

Version:
$Revision: 1.7 $
Author:
Gerd Neugebauer

Constructor Summary
QueryFileHandlerTeXImpl()
          Creates a new object.
 
Method Summary
protected  java.lang.String promptAndReadLine(Localizer localizer, java.util.logging.Logger logger, java.lang.String prompt)
          Read a line of characters from the standard input stream after a prompt has been shown.
 java.lang.String query(java.util.logging.Logger logger, java.util.Properties properties)
          Query the name of a input file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryFileHandlerTeXImpl

public QueryFileHandlerTeXImpl()
Creates a new object.

Method Detail

promptAndReadLine

protected java.lang.String promptAndReadLine(Localizer localizer,
                                             java.util.logging.Logger logger,
                                             java.lang.String prompt)
                                      throws java.io.IOException,
                                             HelpingException
Read a line of characters from the standard input stream after a prompt has been shown. Leading spaces are ignored. At end of file an exception is thrown.

Parameters:
localizer - the localizer
logger - the logger
prompt - the prompt to present before the input is allowed
Returns:
the line read or null to signal EOF
Throws:
java.io.IOException - in case of an error during IO. This is rather unlikely
HelpingException - in case of EOF on terminal

query

public java.lang.String query(java.util.logging.Logger logger,
                              java.util.Properties properties)
Description copied from interface: QueryFileHandler
Query the name of a input file.

Specified by:
query in interface QueryFileHandler
Parameters:
logger - the logger stream for output messages
properties - the properties
Returns:
the file name or null if none has been given
See Also:
QueryFileHandler.query( java.util.logging.Logger, java.util.Properties)