StringEscapeUtils
public
class
StringEscapeUtils
extends Object
java.lang.Object | |
↳ | com.android.tradefed.util.StringEscapeUtils |
Utility class for escaping strings for specific formats. Include methods to escape strings that are being passed to the Android Shell.
Summary
Public constructors | |
---|---|
StringEscapeUtils()
|
Public methods | |
---|---|
static
String
|
escapeShell(String str)
Escapes a |
static
List<String>
|
paramsToArgs(List<String> params)
Converts the provided parameters via options to command line args to sub process This method will do a simplistic generic unescape for each parameter in the list. |
Public constructors
StringEscapeUtils
StringEscapeUtils ()
Public methods
escapeShell
String escapeShell (String str)
Escapes a String
for use in an Android shell command.
Parameters | |
---|---|
str |
String : the String to escape |
Returns | |
---|---|
String |
the Android shell escaped String
|
paramsToArgs
List<String> paramsToArgs (List<String> params)
Converts the provided parameters via options to command line args to sub process
This method will do a simplistic generic unescape for each parameter in the list. It replaces \[char] with [char]. For example, \" is converted to ". This allows string with escaped double quotes to stay as a string after being parsed by QuotationAwareTokenizer. Without this QuotationAwareTokenizer will break the string into sections if it has space in it.
Parameters | |
---|---|
params |
List : parameters received via options |
Returns | |
---|---|
List<String> |
list of string representing command line args |
Interfaces
Classes
- AaptParser
- AbiFormatter
- AbiUtils
- Alarm
- ArrayUtil
- BluetoothUtils
- Bugreport
- BuildTestsZipUtils
- BulkEmailer
- ByteArrayList
- CircularAtraceUtil
- CircularByteArray
- ClassPathScanner
- ClassPathScanner.ClassNameFilter
- ClassPathScanner.ExternalClassNameFilter
- CommandResult
- ConditionPriorityBlockingQueue
- ConditionPriorityBlockingQueue.AlwaysMatch
- ConfigCompletor
- DeviceConcurrentUtil
- DeviceConcurrentUtil.ShellCommandCallable
- DeviceRecoveryModeUtil
- DirectedGraph
- EmmaXmlConstants
- EmmaXmlReportParser
- FakeTestsZipFolder
- FileUtil
- FixedByteArrayOutputStream
- HprofAllocSiteParser
- IEmail.Message
- JUnit4TestFilter
- JUnitXmlParser
- KeyguardControllerState
- ListInstrumentationParser
- ListInstrumentationParser.InstrumentationTarget
- LogcatUpdaterEventParser
- LogcatUpdaterEventParser.AsyncUpdaterEvent
- MultiMap
- NullUtil
- Pair
- ProcessInfo
- PropertyChanger
- PsParser
- QuotationAwareTokenizer
- RegexTrie
- RegexTrie.CompPattern
- RunUtil
- RunUtil.RunnableResult
- SerializationUtil
- SimplePerfResult
- SimplePerfStatResultParser
- SimplePerfUtil
- SimpleStats
- SizeLimitedOutputStream
- StreamUtil
- StringEscapeUtils
- SubprocessEventHelper
- SubprocessEventHelper.BaseTestEventInfo
- SubprocessEventHelper.FailedTestEventInfo
- SubprocessEventHelper.InvocationFailedEventInfo
- SubprocessEventHelper.InvocationStartedEventInfo
- SubprocessEventHelper.TestEndedEventInfo
- SubprocessEventHelper.TestLogEventInfo
- SubprocessEventHelper.TestRunEndedEventInfo
- SubprocessEventHelper.TestRunFailedEventInfo
- SubprocessEventHelper.TestRunStartedEventInfo
- SubprocessEventHelper.TestStartedEventInfo
- SubprocessTestResultsParser
- SubprocessTestResultsParser.StatusKeys
- SystemUtil
- TableFormatter
- TarUtil
- TestFilterHelper
- TestLoader
- TimeUtil
- TimeVal
- UniqueMultiMap
- VersionParser
- ZipCompressionStrategy
- ZipUtil
- ZipUtil2
Enums
Exceptions