public class SSIProcessor extends Object
Modifier and Type | Field and Description |
---|---|
protected static int |
BUFFER_SIZE |
protected static String |
COMMAND_END
The end pattern
|
protected static String |
COMMAND_START
The start pattern
|
protected HashMap<String,SSICommand> |
commands |
protected int |
debug |
protected SSIExternalResolver |
ssiExternalResolver |
Constructor and Description |
---|
SSIProcessor(SSIExternalResolver ssiExternalResolver,
int debug) |
Modifier and Type | Method and Description |
---|---|
protected void |
addBuiltinCommands() |
void |
addCommand(String name,
SSICommand command) |
protected boolean |
charCmp(String buf,
int index,
String command) |
protected boolean |
isQuote(char c) |
protected boolean |
isSpace(char c) |
protected String[] |
parseParamNames(StringBuilder cmd,
int start)
Parse a StringBuilder and take out the param type token.
|
protected String[] |
parseParamValues(StringBuilder cmd,
int start,
int count)
Parse a StringBuilder and take out the param token.
|
long |
process(Reader reader,
long lastModifiedDate,
PrintWriter writer)
Process a file with server-side commands, reading from reader and
writing the processed version to writer.
|
protected static final String COMMAND_START
protected static final String COMMAND_END
protected static final int BUFFER_SIZE
protected SSIExternalResolver ssiExternalResolver
protected HashMap<String,SSICommand> commands
protected int debug
public SSIProcessor(SSIExternalResolver ssiExternalResolver, int debug)
protected void addBuiltinCommands()
public void addCommand(String name, SSICommand command)
public long process(Reader reader, long lastModifiedDate, PrintWriter writer) throws IOException
reader
- the reader to read the file containing SSIs fromwriter
- the writer to write the file with the SSIs processed.IOException
- when things go horribly awry. Should be unlikely since the
SSICommand usually catches 'normal' IOExceptions.protected String[] parseParamNames(StringBuilder cmd, int start)
requestHandler
cmd
- a value of type 'StringBuilder'protected String[] parseParamValues(StringBuilder cmd, int start, int count)
requestHandler
cmd
- a value of type 'StringBuilder'protected boolean isSpace(char c)
protected boolean isQuote(char c)
Copyright © 2021. All rights reserved.