Package com.transifex.common
Class Utils
java.lang.Object
com.transifex.common.Utils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleandeleteDirectory(File directoryToBeDeleted) Deletes a directory including its contentsstatic booleandeleteDirectoryContents(File directoryToBeDeleted) Deletes the directory's contentsstatic StringreadInputStream(InputStream inputStream) Reads an input stream to a string.static StringURL encodes the provided string.
-
Constructor Details
-
Utils
public Utils()
-
-
Method Details
-
readInputStream
Reads an input stream to a string.- Throws:
IOException
-
deleteDirectory
Deletes a directory including its contents- Returns:
trueif and only if the file or directory is successfully deleted;falseotherwise
-
deleteDirectoryContents
Deletes the directory's contents- Returns:
trueif it's a directory and it's content is successfully deleted or it's already empty;falseotherwise
-
urlEncode
URL encodes the provided string.- Throws:
UnsupportedEncodingException
-