Package io.microsphere.convert
Class StringToInputStreamConverter
- java.lang.Object
-
- io.microsphere.convert.StringToInputStreamConverter
-
- All Implemented Interfaces:
Converter<java.lang.String,java.io.InputStream>
,StringConverter<java.io.InputStream>
,Prioritized
,java.lang.Comparable<Prioritized>
public class StringToInputStreamConverter extends java.lang.Object implements StringConverter<java.io.InputStream>
The class to convertString
toInputStream
- Since:
- 1.0.0
- Author:
- Mercy
-
-
Field Summary
Fields Modifier and Type Field Description static java.nio.charset.Charset
DEFAULT_CHARSET
The default charset looks up from the JDK system property"microsphere.charset.default"
if present, or applies"US-ASCII"
static java.lang.String
DEFAULT_CHARSET_PROPERTY_NAME
The JDK system property name : "microsphere.charset.default"-
Fields inherited from interface io.microsphere.lang.Prioritized
COMPARATOR, MAX_PRIORITY, MIN_PRIORITY, NORMAL_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description StringToInputStreamConverter()
StringToInputStreamConverter(java.lang.String encoding)
StringToInputStreamConverter(java.nio.charset.Charset charset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.InputStream
convert(java.lang.String source)
Convert the source-typed value to the target-typed value-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.microsphere.convert.Converter
accept, getSourceType, getTargetType
-
Methods inherited from interface io.microsphere.lang.Prioritized
compareTo, getPriority
-
-
-
-
Field Detail
-
DEFAULT_CHARSET_PROPERTY_NAME
public static final java.lang.String DEFAULT_CHARSET_PROPERTY_NAME
The JDK system property name : "microsphere.charset.default"- See Also:
- Constant Field Values
-
DEFAULT_CHARSET
public static final java.nio.charset.Charset DEFAULT_CHARSET
The default charset looks up from the JDK system property"microsphere.charset.default"
if present, or applies"US-ASCII"
-
-
Method Detail
-
convert
public java.io.InputStream convert(java.lang.String source)
Description copied from interface:Converter
Convert the source-typed value to the target-typed value
-
-