Class XFileSaveService

  • All Implemented Interfaces:
    FileSaveService

    class XFileSaveService
    extends java.lang.Object
    implements FileSaveService
    The FileSaveService JNLP service.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected XFileSaveService()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      FileContents saveAsFileDialog​(java.lang.String pathHint, java.lang.String[] extensions, FileContents contents)
      Prompts the user to save a file, with an optional pre-set filename.
      FileContents saveFileDialog​(java.lang.String pathHint, java.lang.String[] extensions, java.io.InputStream stream, java.lang.String name)
      Prompts the user to save a file.
      private void writeToFile​(java.io.InputStream stream, java.io.File file)
      Writes actual file to disk.
      • Methods inherited from class java.lang.Object

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

      • XFileSaveService

        protected XFileSaveService()
    • Method Detail

      • saveFileDialog

        public FileContents saveFileDialog​(java.lang.String pathHint,
                                           java.lang.String[] extensions,
                                           java.io.InputStream stream,
                                           java.lang.String name)
                                    throws java.io.IOException
        Prompts the user to save a file.
        Specified by:
        saveFileDialog in interface FileSaveService
        Throws:
        java.io.IOException
      • saveAsFileDialog

        public FileContents saveAsFileDialog​(java.lang.String pathHint,
                                             java.lang.String[] extensions,
                                             FileContents contents)
                                      throws java.io.IOException
        Prompts the user to save a file, with an optional pre-set filename.
        Specified by:
        saveAsFileDialog in interface FileSaveService
        Throws:
        java.io.IOException
      • writeToFile

        private void writeToFile​(java.io.InputStream stream,
                                 java.io.File file)
                          throws java.io.IOException
        Writes actual file to disk.
        Throws:
        java.io.IOException