Class ImpExCsvFile

  • All Implemented Interfaces:
    ImpExFile

    public class ImpExCsvFile
    extends java.lang.Object
    implements ImpExFile
    The ImpExCsvFile class is intended to be used for single file data export.
    • Constructor Summary

      Constructors 
      Constructor Description
      ImpExCsvFile()  
      ImpExCsvFile​(java.lang.String fileName)
      Creates a new ImpExCsvFile instance with a corresponding file named fileName.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Closes the OutputStream associated with this instance.
      java.io.File getFile()
      Returns the File object associated with this instance.
      java.lang.String getFileExtension()
      Returns the file extension of the file associated with this instance.
      java.lang.String getMimeType()
      Returns the corresponding mime type for the file associated with this instance.
      java.io.OutputStream getOutputStream()
      Returns the OutputStream associated with this instance.
      • Methods inherited from class java.lang.Object

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

      • ImpExCsvFile

        public ImpExCsvFile()
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • ImpExCsvFile

        public ImpExCsvFile​(java.lang.String fileName)
                     throws java.io.IOException
        Creates a new ImpExCsvFile instance with a corresponding file named fileName.
        Parameters:
        fileName - name of the file associated with this ImpExCsvFile instance.
        Throws:
        java.io.IOException - if any errors occur while opening files and streams associated with this ImpExCsvFile instance.
    • Method Detail

      • getOutputStream

        public java.io.OutputStream getOutputStream()
        Description copied from interface: ImpExFile
        Returns the OutputStream associated with this instance.
        Specified by:
        getOutputStream in interface ImpExFile
        Returns:
        the OutputStream associated with this instance
      • close

        public void close()
                   throws java.io.IOException
        Description copied from interface: ImpExFile
        Closes the OutputStream associated with this instance.
        Specified by:
        close in interface ImpExFile
        Throws:
        java.io.IOException - if any error occur while closing the stream
      • getFile

        public java.io.File getFile()
        Description copied from interface: ImpExFile
        Returns the File object associated with this instance.
        Specified by:
        getFile in interface ImpExFile
        Returns:
        the file associated with the current instance
      • getMimeType

        public java.lang.String getMimeType()
        Description copied from interface: ImpExFile
        Returns the corresponding mime type for the file associated with this instance.
        Specified by:
        getMimeType in interface ImpExFile
        Returns:
        the corresponding mime type of the file associated with this instance
      • getFileExtension

        public java.lang.String getFileExtension()
        Description copied from interface: ImpExFile
        Returns the file extension of the file associated with this instance.
        Specified by:
        getFileExtension in interface ImpExFile
        Returns:
        the file extension of the file associated with this instance