Documentation of 'com.csam.dif.DIFReader' Java class
DIFReader
com.csam.dif

Class DIFReader



  • public class DIFReader
    extends java.lang.Object
    This class reads a DIF file, thus producing a DIFSheet object 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
      DIFSheet read(DIFSheet sheet, java.io.InputStream inStream)
      Reads in a DIF layout from the stream and reproduces the data in the supplied spreadsheet object.
      DIFSheet read(java.io.InputStream inStream)
      Reads in a DIF layout from the stream and reproduces the data in a new spreadsheet object.
      static DIFSheet readSheet(DIFSheet sheet, java.io.InputStream inStream)
      Reads in a DIF layout from the stream and reproduces the data in the supplied spreadsheet object.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DIFReader

        public DIFReader()
        Creates a new instance of DIFReader
    • 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 a DIFSheet object) to read the data into
        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 spreadsheet
        DIFKeywordException - if an anticipated keyword is missing
        DIFDataPairParsingException - if a data pair (e.g. 0,0) cannot be properly parsed
        DIFNumberPairInfoException - if the data in a data pair (which is expected to be 2 numbers) is not what is expected
        DIFStringFormatException - if a string value is malformed in the file
        java.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 a DIFSheet object) to read the data into
        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 spreadsheet
        DIFKeywordException - if an anticipated keyword is missing
        DIFDataPairParsingException - if a data pair (e.g. 0,0) cannot be properly parsed
        DIFNumberPairInfoException - if the data in a data pair (which is expected to be 2 numbers) is not what is expected
        DIFStringFormatException - if a string value is malformed in the file
        java.text.ParseException - if there is some problem parsing data, such as dates

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.