public final class TextUtils extends Object
Modifier and Type | Method and Description |
---|---|
static byte[] |
stringToByteArray(String content,
Charset charset)
Converts a string into a byte array using the specified encoding.
|
static InputStream |
toInputStream(String content)
Convert a string into an input stream.
|
static InputStream |
toInputStream(String content,
Charset charset)
Convert a string into an input stream.
|
public static InputStream toInputStream(String content)
content
- the stringpublic static InputStream toInputStream(String content, Charset charset)
content
- the stringcharset
- the encoding to use when converting the string to a streampublic static byte[] stringToByteArray(String content, Charset charset)
charset
- the charsetcontent
- the string to convertCopyright © 2002–2020 Gargoyle Software Inc.. All rights reserved.