org.ocpsoft.rewrite.servlet.config
Class Stream
java.lang.Object
org.ocpsoft.rewrite.config.DefaultOperationBuilder
org.ocpsoft.rewrite.servlet.config.HttpOperation
org.ocpsoft.rewrite.servlet.config.Stream
- All Implemented Interfaces:
- Operation, OperationBuilder, Parameterized
public abstract class Stream
- extends HttpOperation
- implements Parameterized
An Operation responsible for streaming a File on the host file-system to the
ServletResponse.getOutputStream().
- Author:
- Lincoln Baxter, III
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
public static final org.ocpsoft.logging.Logger log
STREAM_KEY
public static final String STREAM_KEY
target
protected RegexParameterizedPatternBuilder target
Stream
public Stream(File target)
from
public static Stream from(File file)
- Create an
Operation that streams the given File to the
ServletResponse.getOutputStream().
The given File path may be parameterized:
new File("/tmp/file.txt")
new File("c:\tmp\{param}.txt")
...
- Parameters:
location - ParameterizedPattern specifying the location of the File.- See Also:
ConfigurationRuleParameterBuilder#where(String)}
to
public static Operation to(File file)
- Create an
Operation that duplicates content written to ServletResponse.getOutputStream() and
writes it to the given File.
getRequiredParameterNames
public Set<String> getRequiredParameterNames()
- Specified by:
getRequiredParameterNames in interface Parameterized
setParameterStore
public void setParameterStore(ParameterStore store)
- Specified by:
setParameterStore in interface Parameterized
getExpression
public ParameterizedPatternBuilder getExpression()
Copyright © 2013 OCPsoft. All Rights Reserved.