Documentation API of the 'jhplot.io.HFileDIF' Java class
HFileDIF
jhplot.io

Class HFileDIF



  • public class HFileDIFextends Object
    Write or read data in DIF format. The DIF is data interchange Format (.dif) used to import/export spreadsheets between spreadsheet programs. The files are simple text files that can be readable. Should be used to write main ScaVis data structures and import them to spreadsheet (such as OpenOffice). You can write only one object in one file.
    • Constructor Detail

      • HFileDIF

        public HFileDIF(String file,                String option)
        Open a file to write/read data to/from a DIF file. If "w" option is set, the old file will be removed. Use close() to flash the buffer and close the file.

        If the file name starts from http or ftp, we assume it is located on the Web and will attempt to read it from URL.

        Parameters:
        file - File name. Can be located on URL if starts from http or ftp.
        option - Option to create the file. If "w" - write a file (or read) file, if "r" only read created file.
      • HFileDIF

        public HFileDIF(String file)
        Open file for reading.
        Parameters:
        file - File name
    • Method Detail

      • write

        public boolean write(double[] p)
        Write double 1D array into the DIF file.
        Parameters:
        p - input array
        Returns:
        true if success
      • write

        public boolean write(int[] p)
        Write double 1D array into the DIF file.
        Parameters:
        p - input array
        Returns:
        true if success
      • write

        public boolean write(String[] p)
        Write double 1D array into the DIF file.
        Parameters:
        p - input array
        Returns:
        true if success
      • write

        public boolean write(P0I p)
        Write 1D array into the DIF file.
        Parameters:
        p - input array
        Returns:
        true if success
      • write

        public boolean write(P0D p)
        Write 1D array into the DIF file.
        Parameters:
        p - input array
        Returns:
        true if success
      • write

        public boolean write(PND p)
        Write N-dimensional array into the DIF file.
        Parameters:
        p - multidimensional array
        Returns:
        true if success
      • write

        public boolean write(PNI p)
        Write N-dimensional array into the DIF file.
        Parameters:
        p - multidimensional (integer) array
        Returns:
        true if success
      • write

        public boolean write(H1D p)
        Write 1-D histograms (including errors) into the DIF file. First 2 columns are lower and upper edges of the bins, 3rd column is height, 4th is the error on the heights.
        Parameters:
        p - histogram
        Returns:
        true if success
      • write

        public boolean write(P1D p)
        Write 2D array into the DIF file.
        Parameters:
        p - input array
        Returns:
        true if success
      • read

        public DIFSheet read()
        Read data as sheet.
        Returns:
        DIFSheet data.
      • close

        public boolean close()
        Close the file if needed.
        Returns:
        true if success
      • doc

        public void doc()
        Show online documentation.

DMelt 1.2 © DataMelt by jWork.ORG

Warning: You see this message because an access to the DatMelt documentation for third-party Java classes is denied. Guests can only view jhplot Java API. To enable the description of all Java classes of dataMelt, please request the full DataMelt membership.

If you are already a full member, please login to the DataMelt member area before visiting this documentation.