public class FileObjectResource extends Object implements Resource
FileObject
资源包装Constructor and Description |
---|
FileObjectResource(FileObject fileObject)
构造
|
Modifier and Type | Method and Description |
---|---|
FileObject |
getFileObject()
获取原始的
FileObject |
String |
getName()
获取资源名,例如文件资源的资源名为文件名
|
BufferedReader |
getReader(Charset charset)
获得Reader
|
InputStream |
getStream()
获得
InputStream |
URL |
getUrl()
获得解析后的
URL ,无对应URL的返回null |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isModified, readBytes, readStr, readUtf8Str, writeTo
public FileObjectResource(FileObject fileObject)
fileObject
- FileObject
public FileObject getFileObject()
FileObject
FileObject
public InputStream getStream()
Resource
InputStream
getStream
in interface Resource
InputStream
public BufferedReader getReader(Charset charset)
Resource
getReader
in interface Resource
charset
- 编码BufferedReader
Copyright © 2024. All rights reserved.