java.lang.Object | |
↳ | org.jfree.chart.servlet.ServletUtilities |
Utility class used for servlet related JFreeChart operations.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns the prefix for the temporary file names generated by this class.
| |||||||||||
Returns the prefix for "one time" temporary file names generated by
this class.
| |||||||||||
Saves the chart as a JPEG format file in the temporary directory.
| |||||||||||
Saves the chart as a JPEG format file in the temporary directory and
populates the
ChartRenderingInfo object which can be used
to generate an HTML image map. | |||||||||||
Saves the chart as a PNG format file in the temporary directory and
populates the
ChartRenderingInfo object which can be used to
generate an HTML image map. | |||||||||||
Saves the chart as a PNG format file in the temporary directory.
| |||||||||||
Perform a search/replace operation on a String
There are String methods to do this since (JDK 1.4)
| |||||||||||
Binary streams the specified file in the temporary directory to the
HTTP response in 1KB chunks.
| |||||||||||
Binary streams the specified file to the HTTP response in 1KB chunks.
| |||||||||||
Binary streams the specified file to the HTTP response in 1KB chunks.
| |||||||||||
Sets the prefix for the temporary file names generated by this class.
| |||||||||||
Sets the prefix for the "one time" temporary file names generated by
this class.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates the temporary directory if it does not exist.
| |||||||||||
Adds a
ChartDeleter object to the session object with the name
JFreeChart_Deleter if there is not already one bound to the
session and adds the filename to the list of charts to be deleted. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Returns the prefix for the temporary file names generated by this class.
null
).
Returns the prefix for "one time" temporary file names generated by this class.
Saves the chart as a JPEG format file in the temporary directory.
SPECIAL NOTE: Please avoid using JPEG as an image format for charts, it is a "lossy" format that introduces visible distortions in the resulting image - use PNG instead. In addition, note that JPEG output is supported by JFreeChart only for JRE 1.4.2 or later.
chart | the JFreeChart to be saved. |
---|---|
width | the width of the chart. |
height | the height of the chart. |
session | the HttpSession of the client (if null , the
temporary file is marked as "one-time" and deleted by
the DisplayChart servlet right after it is
streamed to the client). |
IOException | if there is a problem saving the file. |
---|
Saves the chart as a JPEG format file in the temporary directory and
populates the ChartRenderingInfo
object which can be used
to generate an HTML image map.
SPECIAL NOTE: Please avoid using JPEG as an image format for charts, it is a "lossy" format that introduces visible distortions in the resulting image - use PNG instead. In addition, note that JPEG output is supported by JFreeChart only for JRE 1.4.2 or later.
chart | the chart to be saved (null not permitted). |
---|---|
width | the width of the chart |
height | the height of the chart |
info | the ChartRenderingInfo object to be populated |
session | the HttpSession of the client (if null , the
temporary file is marked as "one-time" and deleted by
the DisplayChart servlet right after it is
streamed to the client). |
IOException | if there is a problem saving the file. |
---|
Saves the chart as a PNG format file in the temporary directory and
populates the ChartRenderingInfo
object which can be used to
generate an HTML image map.
chart | the chart to be saved (null not permitted). |
---|---|
width | the width of the chart. |
height | the height of the chart. |
info | the ChartRenderingInfo object to be populated
(null permitted). |
session | the HttpSession of the client (if null , the
temporary file is marked as "one-time" and deleted by
the DisplayChart servlet right after it is
streamed to the client). |
IOException | if there is a problem saving the file. |
---|
Saves the chart as a PNG format file in the temporary directory.
chart | the JFreeChart to be saved. |
---|---|
width | the width of the chart. |
height | the height of the chart. |
session | the HttpSession of the client (if null , the
temporary file is marked as "one-time" and deleted by
the DisplayChart servlet right after it is
streamed to the client). |
IOException | if there is a problem saving the file. |
---|
Perform a search/replace operation on a String There are String methods to do this since (JDK 1.4)
inputString | the String to have the search/replace operation. |
---|---|
searchString | the search String. |
replaceString | the replace String. |
Binary streams the specified file in the temporary directory to the HTTP response in 1KB chunks.
filename | the name of the file in the temporary directory. |
---|---|
response | the HTTP response object. |
IOException | if there is an I/O problem. |
---|
Binary streams the specified file to the HTTP response in 1KB chunks.
file | the file to be streamed. |
---|---|
response | the HTTP response object. |
mimeType | the mime type of the file, null allowed. |
IOException | if there is an I/O problem. |
---|
Binary streams the specified file to the HTTP response in 1KB chunks.
file | the file to be streamed. |
---|---|
response | the HTTP response object. |
IOException | if there is an I/O problem. |
---|
Sets the prefix for the temporary file names generated by this class.
prefix | the prefix (null not permitted).
|
---|
Sets the prefix for the "one time" temporary file names generated by this class.
prefix | the prefix (null not permitted).
|
---|
Creates the temporary directory if it does not exist. Throws a
RuntimeException
if the temporary directory is
null
. Uses the system property java.io.tmpdir
as the temporary directory. This sounds like a strange thing to do but
my temporary directory was not created on my default Tomcat 4.0.3
installation. Could save some questions on the forum if it is created
when not present.
Adds a ChartDeleter
object to the session object with the name
JFreeChart_Deleter
if there is not already one bound to the
session and adds the filename to the list of charts to be deleted.
tempFile | the file to be deleted. |
---|---|
session | the HTTP session of the client. |