org.apache.catalina.ssi
Class SSIProcessor
java.lang.Object
org.apache.catalina.ssi.SSIProcessor
public class SSIProcessor
extends java.lang.Object
The entry point to SSI processing. This class does the actual parsing,
delegating to the SSIMediator, SSICommand, and SSIExternalResolver as
necessary[
Version:
- Dan Sandberg
protected void | addBuiltinCommands()
|
void | addCommand(String name, SSICommand command)
|
protected boolean | charCmp(String buf, int index, String command)
|
protected boolean | isSpace(char c)
|
protected String[] | parseParamNames(StringBuffer cmd, int start) - Parse a StringBuffer and take out the param type token.
|
protected String[] | parseParamValues(StringBuffer cmd, int start, int count) - Parse a StringBuffer and take out the param token.
|
void | process(Reader reader, Date lastModifiedDate, PrintWriter writer) - Process a file with server-side commands, reading from reader and
writing the processed version to writer.
|
BUFFER_SIZE
protected static final int BUFFER_SIZE
- 4096
COMMAND_END
protected static final String COMMAND_END
The end pattern
COMMAND_START
protected static final String COMMAND_START
The start pattern
commands
protected HashMap commands
addBuiltinCommands
protected void addBuiltinCommands()
addCommand
public void addCommand(String name,
SSICommand command)
charCmp
protected boolean charCmp(String buf,
int index,
String command)
isSpace
protected boolean isSpace(char c)
parseParamNames
protected String[] parseParamNames(StringBuffer cmd,
int start)
Parse a StringBuffer and take out the param type token. Called from
requestHandler
cmd
- a value of type 'StringBuffer'
- a value of type 'String[]'
parseParamValues
protected String[] parseParamValues(StringBuffer cmd,
int start,
int count)
Parse a StringBuffer and take out the param token. Called from
requestHandler
cmd
- a value of type 'StringBuffer'
- a value of type 'String[]'
process
public void process(Reader reader,
Date lastModifiedDate,
PrintWriter writer)
throws IOException
Process a file with server-side commands, reading from reader and
writing the processed version to writer. NOTE: We really should be doing
this in a streaming way rather than converting it to an array first.
reader
- the reader to read the file containing SSIs fromwriter
- the writer to write the file with the SSIs processed.
Copyright B) 2000-2003 Apache Software Foundation. All Rights Reserved.