|
Revision 581, 0.9 kB
(checked in by scorfield, 1 year ago)
|
|
Fixes #270 by falling back to fake string buffer in writer and cfdirectory in main application if
a security exception triggers creating a Java object.
|
| Line | |
|---|
| 1 | <cfcomponent output="false" hint="I simulate java.lang.StringBuffer when that is disabled by the host."> |
|---|
| 2 | |
|---|
| 3 | <!--- hack to avoid clashing with built-in toString method ---> |
|---|
| 4 | <cfset variables.toString = $toString /> |
|---|
| 5 | |
|---|
| 6 | <cffunction name="init" returntype="any" access="public" output="false"> |
|---|
| 7 | |
|---|
| 8 | <cfset variables.buffer = "" /> |
|---|
| 9 | |
|---|
| 10 | <cfreturn this /> |
|---|
| 11 | |
|---|
| 12 | </cffunction> |
|---|
| 13 | |
|---|
| 14 | <cffunction name="append" returntype="any" access="public" output="false" |
|---|
| 15 | hint="I append a new string to the current buffer."> |
|---|
| 16 | <cfargument name="newString" type="string" required="true" |
|---|
| 17 | hint="I am the new segment to append." /> |
|---|
| 18 | |
|---|
| 19 | <cfset variables.buffer = variables.buffer & arguments.newString /> |
|---|
| 20 | |
|---|
| 21 | <cfreturn this /> |
|---|
| 22 | |
|---|
| 23 | </cffunction> |
|---|
| 24 | |
|---|
| 25 | <cffunction name="$toString" returntype="string" access="public" output="false" |
|---|
| 26 | hint="I return the current buffer as a string."> |
|---|
| 27 | |
|---|
| 28 | <cfreturn variables.buffer /> |
|---|
| 29 | |
|---|
| 30 | </cffunction> |
|---|
| 31 | |
|---|
| 32 | </cfcomponent> |
|---|