|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectorg.eclipse.jetty.util.resource.Resource
org.eclipse.jetty.util.resource.ResourceCollection
public class ResourceCollection
A collection of resources (dirs). Allows webapps to have multiple (static) sources. The first resource in the collection is the main resource. If a resource is not found in the main resource, it looks it up in the order the resources were constructed.
| 字段摘要 |
|---|
| 从类 org.eclipse.jetty.util.resource.Resource 继承的字段 |
|---|
__defaultUseCaches |
| 构造方法摘要 | |
|---|---|
ResourceCollection()
Instantiates an empty resource collection. |
|
ResourceCollection(Resource... resources)
Instantiates a new resource collection. |
|
ResourceCollection(String csvResources)
Instantiates a new resource collection. |
|
ResourceCollection(String[] resources)
Instantiates a new resource collection. |
|
| 方法摘要 | |
|---|---|
Resource |
addPath(String path)
Returns the resource contained inside the current resource with the given name. |
void |
copyTo(File destination)
|
boolean |
delete()
Deletes the given resource |
boolean |
exists()
Returns true if the respresened resource exists. |
protected Object |
findResource(String path)
|
File |
getFile()
Returns an File representing the given resource or NULL if this is not possible. |
InputStream |
getInputStream()
Returns an input stream to the resource |
String |
getName()
Returns the name of the resource |
OutputStream |
getOutputStream()
Returns an output stream to the resource |
Resource[] |
getResources()
Retrieves the resource collection's resources. |
URL |
getURL()
Returns an URL representing the given resource |
boolean |
isContainedIn(Resource r)
|
boolean |
isDirectory()
Returns true if the respresenetd resource is a container/directory. |
long |
lastModified()
Returns the last modified time |
long |
length()
Return the length of the resource |
String[] |
list()
Returns a list of resource names contained in the given resource The resource names are not URL encoded. |
void |
release()
Release any temporary resources held by the resource. |
boolean |
renameTo(Resource dest)
Rename the given resource |
void |
setResources(Resource[] resources)
Sets the resource collection's resources. |
void |
setResourcesAsCSV(String csvResources)
Sets the resources as string of comma-separated values. |
String |
toString()
|
| 从类 org.eclipse.jetty.util.resource.Resource 继承的方法 |
|---|
encode, finalize, getAlias, getAssociate, getDefaultUseCaches, getListHTML, getResource, getURI, getWeakETag, isContainedIn, newClassPathResource, newClassPathResource, newResource, newResource, newResource, newResource, newResource, newSystemResource, setAssociate, setDefaultUseCaches, toURL, writeTo |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| 构造方法详细信息 |
|---|
public ResourceCollection()
public ResourceCollection(Resource... resources)
resources - the resources to be added to collectionpublic ResourceCollection(String[] resources)
resources - the resource strings to be added to collectionpublic ResourceCollection(String csvResources)
csvResources - the string containing comma-separated resource strings| 方法详细信息 |
|---|
public Resource[] getResources()
public void setResources(Resource[] resources)
resources - the new resource arraypublic void setResourcesAsCSV(String csvResources)
csvResources - the comma-separated string containing
one or more resource strings.
public Resource addPath(String path)
throws IOException,
MalformedURLException
Resource 复制的描述
Resource 中的 addPathpath - The path segment to add
IOException
MalformedURLException
protected Object findResource(String path)
throws IOException,
MalformedURLException
path -
IOException
MalformedURLException
public boolean delete()
throws SecurityException
Resource 复制的描述
Resource 中的 deleteSecurityExceptionpublic boolean exists()
Resource 复制的描述
Resource 中的 exists
public File getFile()
throws IOException
Resource 复制的描述
Resource 中的 getFileIOException
public InputStream getInputStream()
throws IOException
Resource 复制的描述
Resource 中的 getInputStreamIOExceptionpublic String getName()
Resource 复制的描述
Resource 中的 getName
public OutputStream getOutputStream()
throws IOException,
SecurityException
Resource 复制的描述
Resource 中的 getOutputStreamIOException
SecurityExceptionpublic URL getURL()
Resource 复制的描述
Resource 中的 getURLpublic boolean isDirectory()
Resource 复制的描述
Resource 中的 isDirectorypublic long lastModified()
Resource 复制的描述
Resource 中的 lastModifiedpublic long length()
Resource 复制的描述
Resource 中的 lengthpublic String[] list()
Resource 复制的描述
Resource 中的 listpublic void release()
Resource 复制的描述
Resource 中的 release
public boolean renameTo(Resource dest)
throws SecurityException
Resource 复制的描述
Resource 中的 renameToSecurityException
public void copyTo(File destination)
throws IOException
Resource 中的 copyToIOExceptionpublic String toString()
Object 中的 toString
public boolean isContainedIn(Resource r)
throws MalformedURLException
Resource 中的 isContainedInMalformedURLException
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||