FileDocCategorySizeDatePackage
FileData.javaAPI DocGlassfish v2 API3067Fri May 04 22:34:44 BST 2007com.sun.enterprise.diagnostics.collect

FileData

public class FileData extends WritableDataImpl
author
Manisha Umbarje

Fields Summary
Constructors Summary
public FileData(String fileName, String type)
Creates a new instance of FileData

        super(fileName, type);
    
Methods Summary
public voidpopulateDataObject()
This method must be called before using other methods such as getValues. Otherwise those methods return null.

        if (source != null) {
            try {
                String fileEntry;
                BufferedReader fileReader = 
                        new BufferedReader(new FileReader(source));
                while((fileEntry = fileReader.readLine()) != null) {
                    values.add(fileEntry);
                }
                
            } catch(FileNotFoundException fnfe) {
                
            } catch(IOException ioe) {
                
            }
        }