Package com.transifex.common
Class Utils
java.lang.Object
com.transifex.common.Utils
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
deleteDirectory
(File directoryToBeDeleted) Deletes a directory including its contentsstatic boolean
deleteDirectoryContents
(File directoryToBeDeleted) Deletes the directory's contentsstatic String
readInputStream
(InputStream inputStream) Reads an input stream to a string.static String
URL 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:
true
if and only if the file or directory is successfully deleted;false
otherwise
-
deleteDirectoryContents
Deletes the directory's contents- Returns:
true
if it's a directory and it's content is successfully deleted or it's already empty;false
otherwise
-
urlEncode
URL encodes the provided string.- Throws:
UnsupportedEncodingException
-