public static final class SshCommandFactory.CommandLine extends AbstractList<String>
Unlike the rest of Unix, SSH protocol uses a single string (as opposed to string array) to pass around a whole command line between the client and the server, and it's up to the server to interpret that string as an array.
This class encapsulates this single-line command arguments and provide both tokenized versions (for typical use) and the direct access to that string (for unusual case), thereby ensuring the consistency across tokenization.
This class implements tokenization that correctly handles escaping by quotes.
modCount
Constructor and Description |
---|
CommandLine(String singleLine) |
Modifier and Type | Method and Description |
---|---|
String |
get(int index) |
String |
getSingleLine()
Returns unaltered raw string.
|
int |
size() |
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
parallelStream, removeIf, stream
public CommandLine(String singleLine)
Copyright © 2016–2022. All rights reserved.