Package de.intarsys.tools.locator
Class CommonLocator
java.lang.Object
de.intarsys.tools.locator.CommonLocator
- All Implemented Interfaces:
ISynchronizable,ILocator
- Direct Known Subclasses:
ByteArrayLocator,ClassLoaderResourceLocator,ClassResourceLocator,FileLocator,LocatorViewport,StreamLocator,StringLocator,TransientLocator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ILocatorvoiddelete()Delete the artifact referenced by this.longReturns the length of this data container or -1 if unknownbooleantrueif the specified resource is read only.voidRename the complete physical name tonewName.voidMake the receiver read only.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.intarsys.tools.locator.ILocator
exists, getChild, getFullName, getInputStream, getLocalName, getOutputStream, getParent, getRandomAccess, getReader, getReader, getType, getTypedName, getWriter, getWriter, isDirectory, listLocators, toURLMethods inherited from interface de.intarsys.tools.component.ISynchronizable
isOutOfSynch, synch
-
Constructor Details
-
CommonLocator
public CommonLocator()
-
-
Method Details
-
createTempFileLocator
- Throws:
IOException
-
delete
Description copied from interface:ILocatorDelete the artifact referenced by this.- Specified by:
deletein interfaceILocator- Throws:
IOException
-
getLength
Description copied from interface:ILocatorReturns the length of this data container or -1 if unknown- Specified by:
getLengthin interfaceILocator- Returns:
- the length of this data container, measured in bytes.
- Throws:
IOException- if an I/O error occurs.
-
isReadOnly
public boolean isReadOnly()Description copied from interface:ILocatortrueif the specified resource is read only.- Specified by:
isReadOnlyin interfaceILocator- Returns:
trueif the specified resource is read only.
-
rename
Description copied from interface:ILocatorRename the complete physical name tonewName.- Specified by:
renamein interfaceILocator- Parameters:
newName- The new name of theILocator. The new name is expected to contain both local and type part of the name.- Throws:
IOException
-
setReadOnly
public void setReadOnly()Description copied from interface:ILocatorMake the receiver read only. This is a one way switch only.- Specified by:
setReadOnlyin interfaceILocator
-