- java.lang.Object
-
- com.github.alexdlaird.util.StringUtils
-
public class StringUtils extends java.lang.Object
Convenience methods for String manipulation.
-
-
Constructor Summary
Constructors Constructor Description StringUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isBlank(java.lang.CharSequence cs)
Check that a String does not contain text.static boolean
isNotBlank(java.lang.CharSequence cs)
Check that a String contains text.static java.lang.String
streamToString(java.io.InputStream inputStream, java.nio.charset.Charset charset)
Convert anInputStream
to a String.
-
-
-
Method Detail
-
streamToString
public static java.lang.String streamToString(java.io.InputStream inputStream, java.nio.charset.Charset charset) throws java.io.IOException
Convert anInputStream
to a String.- Parameters:
inputStream
- The Input Stream to read from.charset
- The charset of the Input Stream.- Returns:
- The resulting String.
- Throws:
java.io.IOException
- An I/O error has occurred.
-
isNotBlank
public static boolean isNotBlank(java.lang.CharSequence cs)
Check that a String contains text.- Parameters:
cs
- The character sequence to check for text.- Returns:
true
if not blank.
-
isBlank
public static boolean isBlank(java.lang.CharSequence cs)
Check that a String does not contain text.- Parameters:
cs
- The character sequence to check for text.- Returns:
true
if blank.
-
-