com.csam.dif
Class DIFReader
- java.lang.Object
-
- com.csam.dif.DIFReader
-
public class DIFReader extends java.lang.ObjectThis class reads a DIF file, thus producing aDIFSheetobject containing the single sheet of information stored in the file.
-
-
Constructor Summary
Constructors Constructor and Description DIFReader()Creates a new instance of DIFReader
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description DIFSheetread(DIFSheet sheet, java.io.InputStream inStream)Reads in a DIF layout from the stream and reproduces the data in the supplied spreadsheet object.DIFSheetread(java.io.InputStream inStream)Reads in a DIF layout from the stream and reproduces the data in a new spreadsheet object.static DIFSheetreadSheet(DIFSheet sheet, java.io.InputStream inStream)Reads in a DIF layout from the stream and reproduces the data in the supplied spreadsheet object.
-
-
-
Method Detail
-
readSheet
public static DIFSheet readSheet(DIFSheet sheet, java.io.InputStream inStream) throws java.io.IOException, DIFKeywordException, DIFDataPairParsingException, DIFNumberPairInfoException, DIFStringFormatException, java.text.ParseException
Reads in a DIF layout from the stream and reproduces the data in the supplied spreadsheet object. The original data in the spreadsheet is wiped out.- Parameters:
sheet- the spreadsheet (represented as aDIFSheetobject) to read the data intoinStream- the stream from which to read the data- Returns:
- the original spreadsheet object, but now containing the new data
- Throws:
java.io.IOException- if an I/O error occurs while reading the spreadsheetDIFKeywordException- if an anticipated keyword is missingDIFDataPairParsingException- if a data pair (e.g. 0,0) cannot be properly parsedDIFNumberPairInfoException- if the data in a data pair (which is expected to be 2 numbers) is not what is expectedDIFStringFormatException- if a string value is malformed in the filejava.text.ParseException- if there is some problem parsing data, such as dates
-
read
public DIFSheet read(DIFSheet sheet, java.io.InputStream inStream) throws java.io.IOException, DIFKeywordException, DIFDataPairParsingException, DIFNumberPairInfoException, DIFStringFormatException, java.text.ParseException
Reads in a DIF layout from the stream and reproduces the data in the supplied spreadsheet object. The original data in the spreadsheet is wiped out.- Parameters:
sheet- the spreadsheet (represented as aDIFSheetobject) to read the data intoinStream- the stream from which to read the data- Returns:
- the original spreadsheet object, but now containing the new data
- Throws:
java.io.IOException- if an I/O error occurs while reading the spreadsheetDIFKeywordException- if an anticipated keyword is missingDIFDataPairParsingException- if a data pair (e.g. 0,0) cannot be properly parsedDIFNumberPairInfoException- if the data in a data pair (which is expected to be 2 numbers) is not what is expectedDIFStringFormatException- if a string value is malformed in the filejava.text.ParseException- if there is some problem parsing data, such as dates
-
read
public DIFSheet read(java.io.InputStream inStream) throws java.io.IOException, DIFKeywordException, DIFDataPairParsingException, DIFNumberPairInfoException, DIFStringFormatException, java.text.ParseException
Reads in a DIF layout from the stream and reproduces the data in a new spreadsheet object.- Parameters:
inStream- the stream from which to read the data- Returns:
- the original spreadsheet object, but now containing the new data
- Throws:
java.io.IOException- if an I/O error occurs while reading the spreadsheetDIFKeywordException- if an anticipated keyword is missingDIFDataPairParsingException- if a data pair (e.g. 0,0) cannot be properly parsedDIFNumberPairInfoException- if the data in a data pair (which is expected to be 2 numbers) is not what is expectedDIFStringFormatException- if a string value is malformed in the filejava.text.ParseException- if there is some problem parsing data, such as dates
-
-
DMelt 3.0 © DataMelt by jWork.ORG