Haikal - Bingo! I got it just the same time there. I am using www.svnkit.com
On 3/29/07, Duncan <[EMAIL PROTECTED]> wrote: > I have just worked it out - you can do this in Java - > > <cfset stringy = createObject("java","java.lang.String").init(f.Content[1])> > <cfset stringy = > ReplacenoCase(ReplacenoCase(Stringy,"<","<","ALL"),">",">")> > > <cfoutput>#stringy</cfoutput> > > Job done - thats how to get it into a CF Variable. > > On 3/29/07, Duncan <[EMAIL PROTECTED]> wrote: > > @Andrew - this doesnt work, just tried it and it outputs to the > > browser where the pageOut.write is. It does not put it into the > > variable. test is created and set, but has a length of 0 and no value. > > > > @Dale - would love to convert it out of Java ByteArray but I dont know > > how to - any hints or pointers gratefully received. > > > > @Haikal - Good idea, however CF cant perform this on a bytearray, the > > error is "ByteArray objects cannot be converted to strings." > > > > On 3/29/07, Haikal Saadh <[EMAIL PROTECTED]> wrote: > > > > > > Shouldn't you have > > > > > > pageOut.write(replaceNoCase(....)) > > > > > > instead of > > > replaceNoCase(pageOut.write() ) > > > > > > > > > > > > Duncan wrote: > > > > Not being able to push this data into a CF var is now becoming a real > > > > problem - I cant do anything to the output. For example I need to > > > > replace < and > with < and > > > > > > > > > Here is an example: > > > > > > > > <cfset sb = > > > > CreateObject("component","org.osborne.svn.svnbrowser").init(application.SVN > > > > & "/" & client.safe,application.svnusr,application.svnpwd)> > > > > <cfset f=sb.FileVersion(url.p,r)> > > > > <cfset pageOut = getPageContext().getResponse().getOutputStream()> > > > > #ReplacenoCase(ReplacenoCase(pageOut.write(f.Content[1], 0, > > > > len(f.Content[1])),"<","<","ALL"),">",">")# > > > > > > > > This returns the content of a file at a revision number in an SVN > > > > repository as a Java bytestream. > > > > > > > > the problem here is that the Replacenocase doesnt do anything. the end > > > > result in the source is still < and > NOT < and > > > > > > > > > If anyone can help me out here it would be HUGE! > > > > > > > > Thanks > > > > > > > > Duncan > > > > > > > > On 3/8/07, Duncan <[EMAIL PROTECTED]> wrote: > > > > > > > >> @charlie - found this on Andrews site: > > > >> http://www.andyscott.id.au/index.cfm/2006/9/12/Proof-of-Concept > > > >> > > > >> Now I have this: > > > >> > > > >> sb is: > > > >> <cfset sb = > > > >> CreateObject("component","org.osborne.svn.svnbrowser").init(application.SVN > > > >> & "/" & client.safe,application.svnusr,application.svnpwd)> i.e. the > > > >> object containing the c current repository & methods available. > > > >> > > > >> <cfinclude template="header.cfm"> > > > >> <cfset f=sb.FileVersion(url.p,r)> > > > >> > > > >> <cfif f.RecordCount GT 0> > > > >> <cfset pageOut = getPageContext().getResponse().getOutputStream()> > > > >> <cfset out = pageOut.write(f.Content[1], 0, len(f.Content[1]))> > > > >> <cfelse> > > > >> No such file or revision > > > >> </cfif> > > > >> <cfinclude template="footer.cfm"> > > > >> > > > >> Interestingly I can now wrap things around this (like a textarea). So > > > >> this is a great improvement over what I had before that reset the > > > >> stream and cleared everything else from the screen. > > > >> > > > >> > > > >> On 3/7/07, Andrew Scott <[EMAIL PROTECTED]> wrote: > > > >> > > > >>> Can you send me the code in question offlist I'll have a look at later > > > >>> tonight if you like, I am not a java guru but know enough to get by > > > >>> most of > > > >>> that POC was help from Mark Mandel and another person who's name > > > >>> escapes me > > > >>> at the moment. > > > >>> > > > >>> But what I do understand is that the pageOut.Write in your code is > > > >>> suppose > > > >>> to turn it into a string or char output, and I guess looking at how > > > >>> it fits > > > >>> in your scenario might help me a bit more. > > > >>> > > > >>> Sorry couldn't be any more helpful there. > > > >>> > > > >>> > > > >>> Andrew Scott > > > >>> Senior Coldfusion Developer > > > >>> Aegeon Pty. Ltd. > > > >>> www.aegeon.com.au > > > >>> Phone:+613 8676 4223 > > > >>> Mobile: 0404 998 273 > > > >>> > > > >>> > > > >>> > > > >>> -----Original Message----- > > > >>> From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf > > > >>> Of Duncan > > > >>> Sent: Wednesday, 7 March 2007 3:56 PM > > > >>> To: cfaussie@googlegroups.com > > > >>> Subject: [cfaussie] Re: Java Output streams into CF vars > > > >>> > > > >>> > > > >>> Thanks Andrew, I can see what this does, but I dont understand it all > > > >>> enough (and the differences between your code and mine) to mash it > > > >>> into what I need. > > > >>> > > > >>> So I have managed to get to this point: > > > >>> > > > >>> pageOut = getPageContext().getResponse().getOutputStream(); > > > >>> out = pageOut.write(f.Content[1], 0, len(f.Content[1])); > > > >>> > > > >>> however this prints the content of the field at the point where this > > > >>> line lives in the page. It doesnt assign it to the variable out. > > > >>> > > > >>> At least now its not resetting the output and its carrying through to > > > >>> include the header and footer. > > > >>> > > > >>> How is it that this is not putting the stream into the out variable? > > > >>> > > > >>> > > > >>> > > > >>> > > > >> -- > > > >> Duncan I Loxton > > > >> [EMAIL PROTECTED] > > > >> > > > >> > > > > > > > > > > > > > > > > > > > > > -- > > > Haikal Saadh > > > Applications Programmer > > > ICT Resources, TALSS > > > QUT Kelvin Grove > > > > > > > > > > > > > > > > > > > > > -- > > Duncan I Loxton > > [EMAIL PROTECTED] > > > > > -- > Duncan I Loxton > [EMAIL PROTECTED] > -- Duncan I Loxton [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cfaussie" group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~----------~----~----~----~------~----~------~--~---