Nope...... works perfectly fine for me.
And a second "readLine" gets the second line from the file.
Regards,
Gary
On 7/26/05, Rod Higgins <[EMAIL PROTECTED]> wrote:
Feature or buggy code (knowing me - buggy code)? I was just playing around
with some code in regards to Martin's problem and came up with this -:
<cfscript>
bufReader=CreateObject('java','java.io.BufferedReader');
fileReader=CreateObject('java','java.io.FileReader');
fileSubStr=bufReader.init(fileReader.init("c:\myFile.txt")).readLine();
writeoutput(fileSubStr);
</cfscript>
On my config, WinXP Pro with CF7 developer, using IE 6, the output in the
browser window is nothing. If you view the source of the browser contents
- the first line of the text file is there (my debugging is turned off).
Why? If you write the variable to any memory scope etc same applies?
Closing the stream and adding a line like bufReader.close(); seems to have
no effect either? If you cfdump the var the line appears. Is it just my
config or a CF feature?
> Anyone know of a way to retrieve a portion of a text file without loading the whole file into memory e.g. CFFILE action="">>
> I potentially have a very large delimited file but I only want to read the first row it contains.
>
> Regards
>
> Martin Gara
> BEARCOM Pty Limited
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/
--- You are currently subscribed to cfaussie as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/
