| java.lang.Object org.ofbiz.datafile.DataFile
DataFile | public class DataFile (Code) | | DataFile main class
author: David E. Jones version: $Revision: 1.2 $ since: 2.0 |
records | protected List records(Code) | | List of record in the file, contains Record objects
|
DataFile | public DataFile(ModelDataFile modelDataFile)(Code) | | Construct a DataFile object setting the model, does not load it
Parameters: modelDataFile - The model of the DataFile to instantiate |
DataFile | protected DataFile()(Code) | | |
makeDataFile | public static DataFile makeDataFile(URL definitionUrl, String dataFileName) throws DataFileException(Code) | | Creates a DataFile object using the specified definition.
Parameters: definitionUrl - The location of the data file definition XML file Parameters: dataFileName - The data file model name, as specified in the definition XML file throws: DataFileException - Exception thown for various errors, generally has a nested exception A new DataFile object |
readDataFile | public void readDataFile(URL fileUrl) throws DataFileException(Code) | | Loads (or reloads) the data file at the pre-specified location.
Parameters: fileUrl - The URL that the file will be loaded from throws: DataFileException - Exception thown for various errors, generally has a nested exception |
readDataFile | public void readDataFile(String content) throws DataFileException(Code) | | Populates (or reloads) the data file with the text of the given content
Parameters: content - The text data to populate the DataFile with throws: DataFileException - Exception thown for various errors, generally has a nested exception |
readDataFile | public void readDataFile(InputStream dataFileStream, String locationInfo) throws DataFileException(Code) | | Loads (or reloads) the data file from the given stream
Parameters: dataFileStream - A stream containing the text data for the data file Parameters: locationInfo - Text information about where the data came from for exception messages throws: DataFileException - Exception thown for various errors, generally has a nested exception |
readFile | public static DataFile readFile(URL fileUrl, URL definitionUrl, String dataFileName) throws DataFileException(Code) | | Creates a DataFile object which will contain the parsed objects for the specified datafile, using the specified definition.
Parameters: fileUrl - The URL where the data file is located Parameters: definitionUrl - The location of the data file definition XML file Parameters: dataFileName - The data file model name, as specified in the definition XML file throws: DataFileException - Exception thown for various errors, generally has a nested exception A new DataFile object with the specified file pre-loaded |
writeDataFile | public void writeDataFile(String filename) throws DataFileException(Code) | | Writes the records in this DataFile object to a text data file
Parameters: filename - The filename to put the data into throws: DataFileException - Exception thown for various errors, generally has a nested exception |
writeDataFile | public String writeDataFile() throws DataFileException(Code) | | Returns the records in this DataFile object as a plain text data file content
throws: DataFileException - Exception thown for various errors, generally has a nested exception A String containing what would go into a data file as plain text |
writeDataFile | public void writeDataFile(OutputStream outStream) throws DataFileException(Code) | | Writes the records in this DataFile object to the given OutputStream
Parameters: outStream - The Stream to put the data into throws: DataFileException - Exception thown for various errors, generally has a nested exception |
|
|