- java.lang.Object
-
- com.github.alexdlaird.util.StringUtils
-
public class StringUtils extends java.lang.ObjectConvenience methods for String manipulation.
-
-
Constructor Summary
Constructors Constructor Description StringUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisBlank(java.lang.CharSequence cs)Check that a String does not contain text.static booleanisNotBlank(java.lang.CharSequence cs)Check that a String contains text.static java.lang.StringstreamToString(java.io.InputStream inputStream, java.nio.charset.Charset charset)Convert anInputStreamto a String.
-
-
-
Method Detail
-
streamToString
public static java.lang.String streamToString(java.io.InputStream inputStream, java.nio.charset.Charset charset) throws java.io.IOExceptionConvert anInputStreamto 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 exception 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:
trueif 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:
trueif blank.
-
-