Package net.sourceforge.jnlp.services
Class XPersistenceService
- java.lang.Object
-
- net.sourceforge.jnlp.services.XPersistenceService
-
- All Implemented Interfaces:
PersistenceService
class XPersistenceService extends java.lang.Object implements PersistenceService
The BasicService JNLP service.- Version:
- $Revision: 1.7 $
-
-
Constructor Summary
Constructors Constructor Description XPersistenceService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidcheckLocation(java.net.URL location)Checks whether the application has access to URL area requested.longcreate(java.net.URL location, long maxsize)voiddelete(java.net.URL location)FileContentsget(java.net.URL location)java.lang.String[]getNames(java.net.URL location)intgetTag(java.net.URL location)voidsetTag(java.net.URL location, int tag)private java.io.FiletoCacheFile(java.net.URL location)Converts a URL into a file in the persistence store.
-
-
-
Field Detail
-
LOG
private static final Logger LOG
-
-
Method Detail
-
checkLocation
private void checkLocation(java.net.URL location) throws java.net.MalformedURLExceptionChecks 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:
createin interfacePersistenceService- Returns:
- the maximum size of storage that got granted, in bytes
- Throws:
java.net.MalformedURLException- if the application cannot access the locationjava.io.IOException
-
delete
public void delete(java.net.URL location) throws java.io.IOException- Specified by:
deletein interfacePersistenceService- Throws:
java.net.MalformedURLException- if the application cannot access the locationjava.io.IOException
-
get
public FileContents get(java.net.URL location) throws java.io.IOException
- Specified by:
getin interfacePersistenceService- Throws:
java.net.MalformedURLException- if the application cannot access the locationjava.io.IOException
-
getNames
public java.lang.String[] getNames(java.net.URL location) throws java.io.IOException- Specified by:
getNamesin interfacePersistenceService- Throws:
java.net.MalformedURLException- if the application cannot access the locationjava.io.IOException
-
getTag
public int getTag(java.net.URL location) throws java.io.IOException- Specified by:
getTagin interfacePersistenceService- Throws:
java.net.MalformedURLException- if the application cannot access the locationjava.io.IOException
-
setTag
public void setTag(java.net.URL location, int tag) throws java.io.IOException- Specified by:
setTagin interfacePersistenceService- Throws:
java.net.MalformedURLException- if the application cannot access the locationjava.io.IOException
-
-