Homepage

netx.jnlp.services
Class XPersistenceService

java.lang.Object
  |
  +--netx.jnlp.services.XPersistenceService
All Implemented Interfaces:
javax.jnlp.PersistenceService

class XPersistenceService
extends java.lang.Object
implements javax.jnlp.PersistenceService

The BasicService JNLP service.

Version:
$Revision: 1.7 $
Author:
Jon A. Maxwell (JAM) - initial author

Field Summary
 
Fields inherited from interface javax.jnlp.PersistenceService
CACHED, DIRTY, TEMPORARY
 
Constructor Summary
protected XPersistenceService()
           
 
Method Summary
protected  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)
           
 javax.jnlp.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)
           
protected  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
 

Constructor Detail

XPersistenceService

protected XPersistenceService()
Method Detail

checkLocation

protected 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

protected java.io.File toCacheFile(java.net.URL location)
                            throws java.net.MalformedURLException
Converts a URL into a file in the persistence store.

Returns:
the file
java.net.MalformedURLException

create

public long create(java.net.URL location,
                   long maxsize)
            throws java.net.MalformedURLException,
                   java.io.IOException
Specified by:
create in interface javax.jnlp.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.net.MalformedURLException,
                   java.io.IOException
Specified by:
delete in interface javax.jnlp.PersistenceService
Throws:
java.net.MalformedURLException - if the application cannot access the location
java.io.IOException

get

public javax.jnlp.FileContents get(java.net.URL location)
                            throws java.net.MalformedURLException,
                                   java.io.IOException,
                                   java.io.FileNotFoundException
Specified by:
get in interface javax.jnlp.PersistenceService
Throws:
java.net.MalformedURLException - if the application cannot access the location
java.io.IOException
java.io.FileNotFoundException

getNames

public java.lang.String[] getNames(java.net.URL location)
                            throws java.net.MalformedURLException,
                                   java.io.IOException
Specified by:
getNames in interface javax.jnlp.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.net.MalformedURLException,
                  java.io.IOException
Specified by:
getTag in interface javax.jnlp.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.net.MalformedURLException,
                   java.io.IOException
Specified by:
setTag in interface javax.jnlp.PersistenceService
Throws:
java.net.MalformedURLException - if the application cannot access the location
java.io.IOException

Homepage