类 JarEntryResource
java.lang.Object
cn.taketoday.core.io.AbstractResource
cn.taketoday.core.io.AbstractFileResolvingResource
cn.taketoday.core.io.UrlResource
cn.taketoday.core.io.JarEntryResource
- 所有已实现的接口:
InputStreamSource,JarResource,OutputStreamSource,Resource,WritableResource,AutoCloseable
- 从以下版本开始:
- 2.1.6
- 作者:
- TODAY
2019-05-15 10:20
-
字段概要
从接口继承的字段 cn.taketoday.core.io.Resource
EMPTY_ARRAY -
构造器概要
构造器构造器说明JarEntryResource(String path) JarEntryResource(URL url) JarEntryResource(URL url, File jarFile, String entryName) -
方法概要
修饰符和类型方法说明voidclose()createRelative(String relativePath) This implementation creates aUrlBasedResource, delegating toUrlResource.createRelativeURL(String)for adapting the relative path.booleanThis implementation compares the underlying URL references.booleanexists()This implementation checks whether a File can be opened, falling back to whether an InputStream can be opened.getFile()This implementation returns a File reference for the underlying URL/URI, provided that it refers to a file in the file system.This implementation opens an InputStream for the given URL.protected static StringgetJarFilePath(String path) protected static StringReturn anOutputStreamfor the underlying resource, allowing to (over-)write its content.inthashCode()This implementation returns the hash code of the underlying URL reference.booleanTests whether the resource denoted by this abstract pathname is a directory.String[]list()listResourceunder the directorytoString()Return a description for this resource, to be used for error output when working with the resource.从类继承的方法 cn.taketoday.core.io.UrlResource
createRelativeURL, from, from, getName, getURI, getURL, isFile从类继承的方法 cn.taketoday.core.io.AbstractFileResolvingResource
contentLength, customizeConnection, customizeConnection, getFile, getFileForLastModifiedCheck, isFile, isReadable, lastModified, readableChannel从类继承的方法 cn.taketoday.core.io.AbstractResource
isOpen, list从接口继承的方法 cn.taketoday.core.io.InputStreamSource
getReader, getReader, readableChannel从接口继承的方法 cn.taketoday.core.io.JarResource
getJarFile从接口继承的方法 cn.taketoday.core.io.OutputStreamSource
getWriter, writableChannel从接口继承的方法 cn.taketoday.core.io.Resource
contentLength, getName, getURI, getURL, isFile, isOpen, isReadable, lastModified, list从接口继承的方法 cn.taketoday.core.io.WritableResource
isWritable
-
构造器详细资料
-
JarEntryResource
-
JarEntryResource
- 抛出:
IOException
-
JarEntryResource
-
-
方法详细资料
-
getJarUrl
-
getJarFilePath
-
getEntryName
-
getInputStream
从类复制的说明:UrlResourceThis implementation opens an InputStream for the given URL.It sets the
useCachesflag tofalse, mainly to avoid jar file locking on Windows.- 指定者:
getInputStream在接口中InputStreamSource- 覆盖:
getInputStream在类中UrlResource- 返回:
- input stream of
Resourcecontent - 抛出:
IOException- If an input exception occurs- 另请参阅:
-
getOutputStream
从接口复制的说明:OutputStreamSourceReturn anOutputStreamfor the underlying resource, allowing to (over-)write its content.- 指定者:
getOutputStream在接口中JarResource- 指定者:
getOutputStream在接口中OutputStreamSource- 抛出:
IOException- if the stream could not be opened
-
getFile
从类复制的说明:UrlResourceThis implementation returns a File reference for the underlying URL/URI, provided that it refers to a file in the file system.- 指定者:
getFile在接口中Resource- 覆盖:
getFile在类中UrlResource- 另请参阅:
-
exists
public boolean exists()从类复制的说明:AbstractResourceThis implementation checks whether a File can be opened, falling back to whether an InputStream can be opened.This will cover both directories and content resources.
- 指定者:
exists在接口中Resource- 覆盖:
exists在类中AbstractFileResolvingResource
-
isDirectory
从接口复制的说明:ResourceTests whether the resource denoted by this abstract pathname is a directory.Where it is required to distinguish an I/O exception from the case that the file is not a directory, or where several attributes of the same file are required at the same time, then the
Files.readAttributesmethod may be used.- 指定者:
isDirectory在接口中Resource- 覆盖:
isDirectory在类中AbstractResource- 返回:
trueif and only if the file denoted by this abstract pathname exists and is a directory;falseotherwise- 抛出:
IOException- cannot determine resource
-
list
从接口复制的说明:ResourcelistResourceunder the directory- 指定者:
list在接口中Resource- 覆盖:
list在类中AbstractResource- 返回:
Resourcenames- 抛出:
IOException- if the resource is not available
-
createRelative
从类复制的说明:UrlResourceThis implementation creates aUrlBasedResource, delegating toUrlResource.createRelativeURL(String)for adapting the relative path.- 指定者:
createRelative在接口中Resource- 覆盖:
createRelative在类中UrlResource- 参数:
relativePath- the relative path (relative to this resource)- 返回:
- the resource handle for the relative resource
- 抛出:
IOException- if the relative resource cannot be determined- 另请参阅:
-
toString
从接口复制的说明:ResourceReturn a description for this resource, to be used for error output when working with the resource.Implementations are also encouraged to return this value from their
toStringmethod.- 指定者:
toString在接口中Resource- 覆盖:
toString在类中UrlResource- 另请参阅:
-
equals
从类复制的说明:UrlResourceThis implementation compares the underlying URL references.- 覆盖:
equals在类中UrlResource
-
hashCode
public int hashCode()从类复制的说明:UrlResourceThis implementation returns the hash code of the underlying URL reference.- 覆盖:
hashCode在类中UrlResource
-
close
- 指定者:
close在接口中AutoCloseable- 抛出:
Exception
-