1 23 package com.sun.enterprise.diagnostics.collect; 24 25 import java.io.IOException ; 26 import java.io.FileNotFoundException ; 27 import java.io.BufferedReader ; 28 import java.io.FileReader ; 29 import com.sun.enterprise.diagnostics.Data; 30 31 35 public class FileData extends WritableDataImpl { 36 37 38 public FileData(String fileName, String type) { 39 super(fileName, type); 40 } 41 42 46 public void populateDataObject() { 47 if (source != null) { 48 try { 49 String fileEntry; 50 BufferedReader fileReader = 51 new BufferedReader (new FileReader (source)); 52 while((fileEntry = fileReader.readLine()) != null) { 53 values.add(fileEntry); 54 } 55 56 } catch(FileNotFoundException fnfe) { 57 58 } catch(IOException ioe) { 59 60 } 61 } 62 } 63 64 } 65 | Popular Tags |