Interface ViewIOKit<M>

    • Method Detail

      • load

        void load​(ModelView<M> view,
                  java.net.URI uri)
           throws java.io.IOException
        Loads data into a view from a given URI.
        Parameters:
        view - The view into which the data should be loaded.
        uri - The URI that identifies the resource to be loaded.
        Throws:
        java.io.IOException - Thrown if there is an error reading the data.
      • load

        void load​(ModelView<M> view,
                  java.io.InputStream inputStream,
                  java.net.URI baseURI)
           throws java.io.IOException
        Loads data into a view from an input stream.
        Parameters:
        view - The view into which the data should be loaded.
        inputStream - The input stream from which to read the data.
        baseURI - The base URI of the content, or null if no base URI is available.
        Throws:
        java.io.IOException - Thrown if there is an error reading the data.
      • save

        void save​(ModelView<M> view,
                  java.net.URI uri)
           throws java.io.IOException
        Saves a view to a given URI.

        If saving is successful and the view is Modifiable, the view's modified status is set to false.

        A calling program should first call the view's verify() method to ensure the data is valid and that the model reflects the currently entered data.

        Parameters:
        view - The view the data of which will be saved at the given URI.
        uri - The URI at which the view data should be saved.
        Throws:
        java.io.IOException - Thrown if there is an error writing the data.
        See Also:
        Modifiable, Verifiable.verify()
      • save

        void save​(ModelView<M> view,
                  java.io.OutputStream outputStream)
           throws java.io.IOException
        Saves a view to an output stream.

        If saving is successful and the view is Modifiable, the view's modified status is set to false.

        A calling program should first call the view's verify() method to ensure the data is valid and that the model reflects the currently entered data.

        Parameters:
        view - The view the data of which will be written to the given output stream.
        outputStream - The output stream to which to write the model content.
        Throws:
        java.io.IOException - Thrown if there is an error writing the data.
        See Also:
        Modifiable, Verifiable.verify()