I'm an RIA Developer who owns a motorcycle custom paint shop, who loves to race anything with wheels. I also enjoy woodworking, cooking, fine wines, liqueurs and dark beers. So if nothing else my blog should be eclectic.  

Category: Java

Aug 12 2008

Read text files one line at a time with ColdFusion

This is a pretty basic use of the how to capitalize on ColdFusion / Java, but I recently had to show someone else how to do this as well as use it myself today to parse a very large CSV file.

<cfscript>
    var f = "";
    var endOfFile = false;

    f = createObject("java","java.io.FileReader").init(arguments.csvFileLocation);
    f = createObject("java","java.io.BufferedReader").init(f);

    while (NOT endOfFile) {
        line = f.readLine();

        if (NOT isDefined("line")) {
            endOfFile = true;
            break;
        } else if (len(line)) {
            // {LINE PARSING CODE HERE}
        }
    }

    f.close();
</cfscript>

5 comments - Posted by Russell Brown at 11:38 AM - Categories: ColdFusion | Java | Development

Apr 5 2008

Confluence Plugin: Advanced Attachment Viewer

I needed a configurable way to display lots of attachments in a Confluence [Atlassian] application/website. This Macro plug-in gives a pretty high level of customization compared to the default one available with the program.


Click read more to download the file and read about it's usage.

Read more...

4 comments - Posted by Russell Brown at 1:16 PM - Categories: Confluence | Java | Development

Categories

Monthly Archives

Tech Blogs I Read

Motorcycle Links