public class ResourceClassFile extends ClassFile implements Delegatable<Resource>
| 构造器和说明 |
|---|
ResourceClassFile() |
ResourceClassFile(Resource delegate) |
| 限定符和类型 | 方法和说明 |
|---|---|
long |
contentLength()
Determine the content length for this resource.
|
String |
getAbsolutePath() |
Resource |
getDelegate() |
InputStream |
getInputStream()
Return an
InputStream for the content of an underlying resource. |
Location |
getLocation() |
String |
getPath() |
String |
getPrefix() |
Object |
getRealResource() |
URL |
getUrl() |
void |
setDelegate(Resource delegate) |
String |
toString() |
getClassNamesetLocation, setLocationexists, isReadable, readableChannelpublic ResourceClassFile()
public ResourceClassFile(Resource delegate)
public String getAbsolutePath()
getAbsolutePath 在接口中 Locatablepublic Location getLocation()
getLocation 在接口中 LocatablegetLocation 在类中 AbstractLocatableResourcepublic String getPrefix()
getPrefix 在接口中 LocatablegetPrefix 在类中 AbstractLocatableResourcepublic String getPath()
getPath 在接口中 LocatablegetPath 在类中 AbstractLocatableResourcepublic String toString()
toString 在类中 AbstractLocatableResourcepublic Object getRealResource()
getRealResource 在接口中 Resourcepublic InputStream getInputStream() throws IOException
ResourceInputStream for the content of an underlying resource.
It is expected that each call creates a fresh stream.
This requirement is particularly important when you consider an API such
as JavaMail, which needs to be able to read the stream multiple times when
creating mail attachments. For such a use case, it is required
that each getInputStream() call returns a fresh stream.
getInputStream 在接口中 Resourcenull)FileNotFoundException - if the underlying resource doesn't existIOException - if the content stream could not be openedpublic long contentLength()
ResourcecontentLength 在接口中 Resourcepublic URL getUrl() throws IOException
getUrl 在接口中 UrlableIOExceptionpublic Resource getDelegate()
getDelegate 在接口中 Delegatable<Resource>public void setDelegate(Resource delegate)
setDelegate 在接口中 Delegatable<Resource>Copyright © 2020. All rights reserved.