public class UrlResource extends BaseResource implements InternalResource, Externalizable
Constructor and Description |
---|
UrlResource() |
UrlResource(String path) |
UrlResource(String path,
String encoding) |
UrlResource(URL url) |
UrlResource(URL url,
String encoding) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
This implementation compares the underlying URL references.
|
String |
getBasicAuthentication() |
String |
getEncoding() |
File |
getFile() |
InputStream |
getInputStream()
This implementation opens an InputStream for the given URL.
|
long |
getLastModified() |
long |
getLastRead() |
String |
getPassword() |
Reader |
getReader() |
URL |
getURL() |
String |
getUsername() |
int |
hashCode()
This implementation returns the hash code of the underlying URL reference.
|
boolean |
hasURL() |
boolean |
isDirectory() |
Collection<org.kie.api.io.Resource> |
listResources() |
void |
readExternal(ObjectInput in) |
void |
setBasicAuthentication(String basicAuthentication) |
void |
setPassword(String password) |
void |
setUsername(String username) |
String |
toString() |
void |
writeExternal(ObjectOutput out) |
addCategory, getBytes, getCategories, getConfiguration, getDescription, getResourceType, getSourcePath, getTargetPath, setCategories, setConfiguration, setDescription, setResourceType, setSourcePath, setTargetPath
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addCategory, getBytes, getCategories, getConfiguration, getDescription, getResourceType, setCategories, setConfiguration, setDescription, setResourceType
public static final File CACHE_DIR
public UrlResource()
public UrlResource(URL url)
public UrlResource(String path)
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class BaseResource
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
readExternal
in class BaseResource
IOException
ClassNotFoundException
public String getEncoding()
getEncoding
in interface InternalResource
public String getBasicAuthentication()
public void setBasicAuthentication(String basicAuthentication)
public String getUsername()
public void setUsername(String username)
public String getPassword()
public void setPassword(String password)
public InputStream getInputStream() throws IOException
false
,
mainly to avoid jar file locking on Windows.getInputStream
in interface org.kie.api.io.Resource
IOException
URL.openConnection()
,
URLConnection.setUseCaches(boolean)
,
URLConnection.getInputStream()
public Reader getReader() throws IOException
getReader
in interface org.kie.api.io.Resource
IOException
public URL getURL() throws IOException
getURL
in interface InternalResource
IOException
public boolean hasURL()
hasURL
in interface InternalResource
public File getFile() throws IOException
IOException
public long getLastModified()
getLastModified
in interface InternalResource
public long getLastRead()
getLastRead
in interface InternalResource
public boolean isDirectory()
isDirectory
in interface InternalResource
public Collection<org.kie.api.io.Resource> listResources()
listResources
in interface InternalResource
public boolean equals(Object obj)
equals
in class BaseResource
public int hashCode()
hashCode
in class BaseResource
public String toString()
toString
in class BaseResource
Copyright © 2001-2015 JBoss by Red Hat. All Rights Reserved.