org.xwiki.extension.repository.internal.core
Class DefaultCoreExtensionFile
java.lang.Object
org.xwiki.extension.repository.internal.core.DefaultCoreExtensionFile
- All Implemented Interfaces:
- CoreExtensionFile, ExtensionFile
public class DefaultCoreExtensionFile
- extends Object
- implements CoreExtensionFile
Default implementation of CoreExtensionFile
.
- Since:
- 4.0M1
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultCoreExtensionFile
public DefaultCoreExtensionFile(URL url)
- Parameters:
url
- the URL of the core extension
getLength
public long getLength()
- Specified by:
getLength
in interface ExtensionFile
- Returns:
- the size of the extension file, -1 if not provided
openStream
public InputStream openStream()
throws IOException
- Description copied from interface:
ExtensionFile
- Open an input stream to allows reading the extensions.
Note that it's up to the user of this method to close the stream.
- Specified by:
openStream
in interface ExtensionFile
- Returns:
- the stream to read
- Throws:
IOException
- error when opening the stream
getURL
public URL getURL()
- Specified by:
getURL
in interface CoreExtensionFile
- Returns:
- the core extension URL