|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.extex.interpreter.type.AbstractCode
org.extex.unit.base.file.AbstractFileCode
public abstract class AbstractFileCode
This abstract class provides some common methods for primitives dealing with files.
| Field Summary | |
|---|---|
static int |
MAX_IN_FILE_NO
The constant MAX_OUT_FILE_NO contains the maximum number of input files. |
static int |
MAX_OUT_FILE_NO
The constant MAX_OUT_FILE_NO contains the maximal number of output files. |
| Fields inherited from class org.extex.interpreter.type.AbstractCode |
|---|
serialVersionUID |
| Constructor Summary | |
|---|---|
AbstractFileCode(CodeToken token)
Creates a new object. |
|
| Method Summary | |
|---|---|
void |
configure(Configuration config)
Configure an object according to a given Configuration. |
protected java.lang.String |
getEncoding(Context context)
Return the encoding for the AbstractFileCode file. |
protected java.lang.String |
scanFileName(Context context,
TokenSource source)
Scan the file name. |
static java.lang.String |
scanInFileKey(Context context,
TokenSource source,
Typesetter typesetter)
Scan the input source for some tokens making up the key for an infile register. |
static java.lang.String |
scanOutFileKey(Context context,
TokenSource source,
Typesetter typesetter)
Scan the input source for some tokens making up the key for an outfile register. |
| Methods inherited from class org.extex.interpreter.type.AbstractCode |
|---|
execute, getLocalizer, getName, getToken, isIf, isOuter, readResolve, toString, toText, toText |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int MAX_IN_FILE_NO
public static final int MAX_OUT_FILE_NO
| Constructor Detail |
|---|
public AbstractFileCode(CodeToken token)
token - the initial token for the primitive| Method Detail |
|---|
public static java.lang.String scanInFileKey(Context context,
TokenSource source,
Typesetter typesetter)
throws HelpingException,
TypesetterException
The infile name is a symbolic key to reference an input file. This is a number in the range from 0 to 15.
〈infile name〉
→ 〈number〉
context - the interpreter contextsource - the token source to read fromtypesetter - the typesetter
HelpingException - in case of a failure
TypesetterException - in case of an error in the typesetter
public static java.lang.String scanOutFileKey(Context context,
TokenSource source,
Typesetter typesetter)
throws HelpingException,
TypesetterException
The outfile name is a symbolic key to reference an output file. This is a number in the range from 0 to 15.
〈infile name〉
→ 〈number〉
context - the interpreter contextsource - the token source to read fromtypesetter - the typesetter
HelpingException - in case of a failure
TypesetterException - in case of an error in the typesetterpublic void configure(Configuration config)
config - the configuration to use
ConfigurationException - in case of an errororg.extex.framework.configuration.Configurable#configure(
org.extex.framework.configuration.Configuration)protected java.lang.String getEncoding(Context context)
First of all, \fileencoding is used, if there is no value,
then the property extex.encoding is used, or
ISO8859-1, if no entry exists.
context - the context
protected java.lang.String scanFileName(Context context,
TokenSource source)
throws HelpingException,
TypesetterException
〈file name〉The scanning is performed in one of two ways:
context - the processing contextsource - the source for new tokens
HelpingException - in case of an error
TypesetterException - in case of an error in the typesetter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||