org.apache.turbine.modules.screens
Class RawScreen
java.lang.Object
|
+--org.apache.turbine.modules.Assembler
|
+--org.apache.turbine.modules.Screen
|
+--org.apache.turbine.modules.screens.RawScreen
- public abstract class RawScreen
- extends Screen
Base class for writing Screens that output binary data. This class
is provided as a helper class for those who want to write Screens
that output raw binary data. For example, it may be extended into
a Screen that outputs a SVG file or a SWF (Flash Player format)
movie. The only thing one has to do is to implement the two
methods getContentType(RunData data)
and
doOutput(RunData data)
(see below).
You migth want to take a look at the ImageServer screen class
contained in the TDK.
- Version:
- $Id: RawScreen.java,v 1.1.1.1 2001/08/16 05:08:37 jvanzyl Exp $
- Author:
- Regis Koenig
Method Summary |
protected org.apache.ecs.ConcreteElement |
doBuild(RunData data)
Build the Screen. |
protected abstract void |
doOutput(RunData data)
Actually output the dynamic content. |
protected abstract java.lang.String |
getContentType(RunData data)
Set the content type. |
java.lang.String |
getLayout(RunData data)
The layout must be set to null. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
RawScreen
public RawScreen()
doBuild
protected final org.apache.ecs.ConcreteElement doBuild(RunData data)
throws java.lang.Exception
- Build the Screen. This method actually makes a call to the
doOutput() method in order to generate the Screen content.
- Overrides:
doBuild
in class Screen
- Parameters:
data
- Turbine information.- Returns:
- A ConcreteElement.
- Throws:
Exception,
- a generic exception.
getContentType
protected abstract java.lang.String getContentType(RunData data)
- Set the content type. This method should be overidden to
actually set the real content-type header of the output.
- Parameters:
data
- Turbine information.- Returns:
- A String with the content type.
doOutput
protected abstract void doOutput(RunData data)
throws java.lang.Exception
- Actually output the dynamic content. The OutputStream can be
accessed like this:
OutputStream out =
data.getResponse().getOutputStream();
.
- Parameters:
data
- Turbine information.- Throws:
Exception,
- a generic exception.
getLayout
public final java.lang.String getLayout(RunData data)
- The layout must be set to null.
- Overrides:
getLayout
in class Screen
- Parameters:
data
- Turbine information.- Returns:
- A null String.
Copyright © 2000-2002 Apache Software Foundation. All Rights Reserved.