Package org.miaixz.bus.core.io.resource
Class StringResource
java.lang.Object
org.miaixz.bus.core.io.resource.CharSequenceResource
org.miaixz.bus.core.io.resource.StringResource
- All Implemented Interfaces:
Serializable,Resource
字符串资源,字符串做为资源
- Since:
- Java 17+
- Author:
- Kimi Liu
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionStringResource(String data) 构造,使用UTF8编码StringResource(String data, String name) 构造,使用UTF8编码StringResource(String data, String name, Charset charset) 构造 -
Method Summary
Methods inherited from class org.miaixz.bus.core.io.resource.CharSequenceResource
getName, getReader, getStream, getUrl, readBytes, readString, sizeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.miaixz.bus.core.io.resource.Resource
isModified, readString, writeTo
-
Constructor Details
-
StringResource
构造,使用UTF8编码- Parameters:
data- 资源数据
-
StringResource
构造,使用UTF8编码- Parameters:
data- 资源数据name- 资源名称
-
StringResource
构造- Parameters:
data- 资源数据name- 资源名称charset- 编码
-