Class XPersistenceService

  • All Implemented Interfaces:
    PersistenceService

    class XPersistenceService
    extends java.lang.Object
    implements PersistenceService
    The BasicService JNLP service.
    Version:
    $Revision: 1.7 $
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void checkLocation​(java.net.URL location)
      Checks whether the application has access to URL area requested.
      long create​(java.net.URL location, long maxsize)  
      void delete​(java.net.URL location)  
      FileContents get​(java.net.URL location)  
      java.lang.String[] getNames​(java.net.URL location)  
      int getTag​(java.net.URL location)  
      void setTag​(java.net.URL location, int tag)  
      private java.io.File toCacheFile​(java.net.URL location)
      Converts a URL into a file in the persistence store.
      • Methods inherited from class java.lang.Object

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

      • LOG

        private static final Logger LOG
    • Constructor Detail

      • XPersistenceService

        XPersistenceService()
    • Method Detail

      • checkLocation

        private void checkLocation​(java.net.URL location)
                            throws java.net.MalformedURLException
        Checks whether the application has access to URL area requested. If the method returns normally then the specified location can be accessed by the current application.
        Throws:
        java.net.MalformedURLException - if the application cannot access the location
      • toCacheFile

        private java.io.File toCacheFile​(java.net.URL location)
        Converts a URL into a file in the persistence store.
        Returns:
        the file
      • create

        public long create​(java.net.URL location,
                           long maxsize)
                    throws java.io.IOException
        Specified by:
        create in interface PersistenceService
        Returns:
        the maximum size of storage that got granted, in bytes
        Throws:
        java.net.MalformedURLException - if the application cannot access the location
        java.io.IOException
      • delete

        public void delete​(java.net.URL location)
                    throws java.io.IOException
        Specified by:
        delete in interface PersistenceService
        Throws:
        java.net.MalformedURLException - if the application cannot access the location
        java.io.IOException
      • get

        public FileContents get​(java.net.URL location)
                         throws java.io.IOException
        Specified by:
        get in interface PersistenceService
        Throws:
        java.net.MalformedURLException - if the application cannot access the location
        java.io.IOException
      • getNames

        public java.lang.String[] getNames​(java.net.URL location)
                                    throws java.io.IOException
        Specified by:
        getNames in interface PersistenceService
        Throws:
        java.net.MalformedURLException - if the application cannot access the location
        java.io.IOException
      • getTag

        public int getTag​(java.net.URL location)
                   throws java.io.IOException
        Specified by:
        getTag in interface PersistenceService
        Throws:
        java.net.MalformedURLException - if the application cannot access the location
        java.io.IOException
      • setTag

        public void setTag​(java.net.URL location,
                           int tag)
                    throws java.io.IOException
        Specified by:
        setTag in interface PersistenceService
        Throws:
        java.net.MalformedURLException - if the application cannot access the location
        java.io.IOException