|
What this is
Other links
The source code/* $Id: log.java,v 1.3 2001/01/17 22:40:03 agarcia3 Exp $ webEditor. The new way in content management Copyright (C) 2001 Alfredo Garcia This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. */ package webEditor.util; import java.io.*; /** * Simple log file operations. * * Our intention is to use the same system * to stored application events and system errors. * * @author <a href="mailto:agarcia@mundofree.com">Alfredo Garcia */ public class log { public log () { } /** * Read the content of a file in a single string * @param file File to write * @return void */ public void errorLog (String file) { RandomAccessFile fileDesc; String buffer = null; String line = null; try { fileDesc = new RandomAccessFile (file,"r"); while ( (line = fileDesc.readLine() ) != null ) { if ( buffer == null ) { buffer = line + "\n"; } else { buffer = buffer + line + "\n"; } } } catch (Exception e) { e.printStackTrace(); } } } |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.