Network programming assignment for University
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CommandLineParser.html 13 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!-- NewPage -->
  3. <html lang="de">
  4. <head>
  5. <!-- Generated by javadoc -->
  6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  7. <title>CommandLineParser (Apache Commons CLI 1.4 API)</title>
  8. <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
  9. <script type="text/javascript" src="../../../../script.js"></script>
  10. </head>
  11. <body>
  12. <script type="text/javascript"><!--
  13. try {
  14. if (location.href.indexOf('is-external=true') == -1) {
  15. parent.document.title="CommandLineParser (Apache Commons CLI 1.4 API)";
  16. }
  17. }
  18. catch(err) {
  19. }
  20. //-->
  21. var methods = {"i0":6,"i1":6};
  22. var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
  23. var altColor = "altColor";
  24. var rowColor = "rowColor";
  25. var tableTab = "tableTab";
  26. var activeTableTab = "activeTableTab";
  27. </script>
  28. <noscript>
  29. <div>JavaScript is disabled on your browser.</div>
  30. </noscript>
  31. <!-- ========= START OF TOP NAVBAR ======= -->
  32. <div class="topNav"><a name="navbar.top">
  33. <!-- -->
  34. </a>
  35. <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
  36. <a name="navbar.top.firstrow">
  37. <!-- -->
  38. </a>
  39. <ul class="navList" title="Navigation">
  40. <li><a href="../../../../org/apache/commons/cli/package-summary.html">Package</a></li>
  41. <li class="navBarCell1Rev">Class</li>
  42. <li><a href="class-use/CommandLineParser.html">Use</a></li>
  43. <li><a href="package-tree.html">Tree</a></li>
  44. <li><a href="../../../../deprecated-list.html">Deprecated</a></li>
  45. <li><a href="../../../../index-all.html">Index</a></li>
  46. <li><a href="../../../../help-doc.html">Help</a></li>
  47. </ul>
  48. </div>
  49. <div class="subNav">
  50. <ul class="navList">
  51. <li><a href="../../../../org/apache/commons/cli/CommandLine.Builder.html" title="class in org.apache.commons.cli"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
  52. <li><a href="../../../../org/apache/commons/cli/DefaultParser.html" title="class in org.apache.commons.cli"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
  53. </ul>
  54. <ul class="navList">
  55. <li><a href="../../../../index.html?org/apache/commons/cli/CommandLineParser.html" target="_top">Frames</a></li>
  56. <li><a href="CommandLineParser.html" target="_top">No&nbsp;Frames</a></li>
  57. </ul>
  58. <ul class="navList" id="allclasses_navbar_top">
  59. <li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
  60. </ul>
  61. <div>
  62. <script type="text/javascript"><!--
  63. allClassesLink = document.getElementById("allclasses_navbar_top");
  64. if(window==top) {
  65. allClassesLink.style.display = "block";
  66. }
  67. else {
  68. allClassesLink.style.display = "none";
  69. }
  70. //-->
  71. </script>
  72. </div>
  73. <div>
  74. <ul class="subNavList">
  75. <li>Summary:&nbsp;</li>
  76. <li>Nested&nbsp;|&nbsp;</li>
  77. <li>Field&nbsp;|&nbsp;</li>
  78. <li>Constr&nbsp;|&nbsp;</li>
  79. <li><a href="#method.summary">Method</a></li>
  80. </ul>
  81. <ul class="subNavList">
  82. <li>Detail:&nbsp;</li>
  83. <li>Field&nbsp;|&nbsp;</li>
  84. <li>Constr&nbsp;|&nbsp;</li>
  85. <li><a href="#method.detail">Method</a></li>
  86. </ul>
  87. </div>
  88. <a name="skip.navbar.top">
  89. <!-- -->
  90. </a></div>
  91. <!-- ========= END OF TOP NAVBAR ========= -->
  92. <!-- ======== START OF CLASS DATA ======== -->
  93. <div class="header">
  94. <div class="subTitle">org.apache.commons.cli</div>
  95. <h2 title="Interface CommandLineParser" class="title">Interface CommandLineParser</h2>
  96. </div>
  97. <div class="contentContainer">
  98. <div class="description">
  99. <ul class="blockList">
  100. <li class="blockList">
  101. <dl>
  102. <dt>All Known Implementing Classes:</dt>
  103. <dd><a href="../../../../org/apache/commons/cli/BasicParser.html" title="class in org.apache.commons.cli">BasicParser</a>, <a href="../../../../org/apache/commons/cli/DefaultParser.html" title="class in org.apache.commons.cli">DefaultParser</a>, <a href="../../../../org/apache/commons/cli/GnuParser.html" title="class in org.apache.commons.cli">GnuParser</a>, <a href="../../../../org/apache/commons/cli/Parser.html" title="class in org.apache.commons.cli">Parser</a>, <a href="../../../../org/apache/commons/cli/PosixParser.html" title="class in org.apache.commons.cli">PosixParser</a></dd>
  104. </dl>
  105. <hr>
  106. <br>
  107. <pre>public interface <span class="typeNameLabel">CommandLineParser</span></pre>
  108. <div class="block">A class that implements the <code>CommandLineParser</code> interface
  109. can parse a String array according to the <a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli"><code>Options</code></a> specified
  110. and return a <a href="../../../../org/apache/commons/cli/CommandLine.html" title="class in org.apache.commons.cli"><code>CommandLine</code></a>.</div>
  111. <dl>
  112. <dt><span class="simpleTagLabel">Version:</span></dt>
  113. <dd>$Id: CommandLineParser.java 1443102 2013-02-06 18:12:16Z tn $</dd>
  114. </dl>
  115. </li>
  116. </ul>
  117. </div>
  118. <div class="summary">
  119. <ul class="blockList">
  120. <li class="blockList">
  121. <!-- ========== METHOD SUMMARY =========== -->
  122. <ul class="blockList">
  123. <li class="blockList"><a name="method.summary">
  124. <!-- -->
  125. </a>
  126. <h3>Method Summary</h3>
  127. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
  128. <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
  129. <tr>
  130. <th class="colFirst" scope="col">Modifier and Type</th>
  131. <th class="colLast" scope="col">Method and Description</th>
  132. </tr>
  133. <tr id="i0" class="altColor">
  134. <td class="colFirst"><code><a href="../../../../org/apache/commons/cli/CommandLine.html" title="class in org.apache.commons.cli">CommandLine</a></code></td>
  135. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/CommandLineParser.html#parse-org.apache.commons.cli.Options-java.lang.String:A-">parse</a></span>(<a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli">Options</a>&nbsp;options,
  136. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]&nbsp;arguments)</code>
  137. <div class="block">Parse the arguments according to the specified options.</div>
  138. </td>
  139. </tr>
  140. <tr id="i1" class="rowColor">
  141. <td class="colFirst"><code><a href="../../../../org/apache/commons/cli/CommandLine.html" title="class in org.apache.commons.cli">CommandLine</a></code></td>
  142. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/CommandLineParser.html#parse-org.apache.commons.cli.Options-java.lang.String:A-boolean-">parse</a></span>(<a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli">Options</a>&nbsp;options,
  143. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]&nbsp;arguments,
  144. boolean&nbsp;stopAtNonOption)</code>
  145. <div class="block">Parse the arguments according to the specified options.</div>
  146. </td>
  147. </tr>
  148. </table>
  149. </li>
  150. </ul>
  151. </li>
  152. </ul>
  153. </div>
  154. <div class="details">
  155. <ul class="blockList">
  156. <li class="blockList">
  157. <!-- ============ METHOD DETAIL ========== -->
  158. <ul class="blockList">
  159. <li class="blockList"><a name="method.detail">
  160. <!-- -->
  161. </a>
  162. <h3>Method Detail</h3>
  163. <a name="parse-org.apache.commons.cli.Options-java.lang.String:A-">
  164. <!-- -->
  165. </a>
  166. <ul class="blockList">
  167. <li class="blockList">
  168. <h4>parse</h4>
  169. <pre><a href="../../../../org/apache/commons/cli/CommandLine.html" title="class in org.apache.commons.cli">CommandLine</a>&nbsp;parse(<a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli">Options</a>&nbsp;options,
  170. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]&nbsp;arguments)
  171. throws <a href="../../../../org/apache/commons/cli/ParseException.html" title="class in org.apache.commons.cli">ParseException</a></pre>
  172. <div class="block">Parse the arguments according to the specified options.</div>
  173. <dl>
  174. <dt><span class="paramLabel">Parameters:</span></dt>
  175. <dd><code>options</code> - the specified Options</dd>
  176. <dd><code>arguments</code> - the command line arguments</dd>
  177. <dt><span class="returnLabel">Returns:</span></dt>
  178. <dd>the list of atomic option and value tokens</dd>
  179. <dt><span class="throwsLabel">Throws:</span></dt>
  180. <dd><code><a href="../../../../org/apache/commons/cli/ParseException.html" title="class in org.apache.commons.cli">ParseException</a></code> - if there are any problems encountered
  181. while parsing the command line tokens.</dd>
  182. </dl>
  183. </li>
  184. </ul>
  185. <a name="parse-org.apache.commons.cli.Options-java.lang.String:A-boolean-">
  186. <!-- -->
  187. </a>
  188. <ul class="blockListLast">
  189. <li class="blockList">
  190. <h4>parse</h4>
  191. <pre><a href="../../../../org/apache/commons/cli/CommandLine.html" title="class in org.apache.commons.cli">CommandLine</a>&nbsp;parse(<a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli">Options</a>&nbsp;options,
  192. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]&nbsp;arguments,
  193. boolean&nbsp;stopAtNonOption)
  194. throws <a href="../../../../org/apache/commons/cli/ParseException.html" title="class in org.apache.commons.cli">ParseException</a></pre>
  195. <div class="block">Parse the arguments according to the specified options.</div>
  196. <dl>
  197. <dt><span class="paramLabel">Parameters:</span></dt>
  198. <dd><code>options</code> - the specified Options</dd>
  199. <dd><code>arguments</code> - the command line arguments</dd>
  200. <dd><code>stopAtNonOption</code> - if <tt>true</tt> an unrecognized argument stops
  201. the parsing and the remaining arguments are added to the
  202. <a href="../../../../org/apache/commons/cli/CommandLine.html" title="class in org.apache.commons.cli"><code>CommandLine</code></a>s args list. If <tt>false</tt> an unrecognized
  203. argument triggers a ParseException.</dd>
  204. <dt><span class="returnLabel">Returns:</span></dt>
  205. <dd>the list of atomic option and value tokens</dd>
  206. <dt><span class="throwsLabel">Throws:</span></dt>
  207. <dd><code><a href="../../../../org/apache/commons/cli/ParseException.html" title="class in org.apache.commons.cli">ParseException</a></code> - if there are any problems encountered
  208. while parsing the command line tokens.</dd>
  209. </dl>
  210. </li>
  211. </ul>
  212. </li>
  213. </ul>
  214. </li>
  215. </ul>
  216. </div>
  217. </div>
  218. <!-- ========= END OF CLASS DATA ========= -->
  219. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  220. <div class="bottomNav"><a name="navbar.bottom">
  221. <!-- -->
  222. </a>
  223. <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
  224. <a name="navbar.bottom.firstrow">
  225. <!-- -->
  226. </a>
  227. <ul class="navList" title="Navigation">
  228. <li><a href="../../../../org/apache/commons/cli/package-summary.html">Package</a></li>
  229. <li class="navBarCell1Rev">Class</li>
  230. <li><a href="class-use/CommandLineParser.html">Use</a></li>
  231. <li><a href="package-tree.html">Tree</a></li>
  232. <li><a href="../../../../deprecated-list.html">Deprecated</a></li>
  233. <li><a href="../../../../index-all.html">Index</a></li>
  234. <li><a href="../../../../help-doc.html">Help</a></li>
  235. </ul>
  236. </div>
  237. <div class="subNav">
  238. <ul class="navList">
  239. <li><a href="../../../../org/apache/commons/cli/CommandLine.Builder.html" title="class in org.apache.commons.cli"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
  240. <li><a href="../../../../org/apache/commons/cli/DefaultParser.html" title="class in org.apache.commons.cli"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
  241. </ul>
  242. <ul class="navList">
  243. <li><a href="../../../../index.html?org/apache/commons/cli/CommandLineParser.html" target="_top">Frames</a></li>
  244. <li><a href="CommandLineParser.html" target="_top">No&nbsp;Frames</a></li>
  245. </ul>
  246. <ul class="navList" id="allclasses_navbar_bottom">
  247. <li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
  248. </ul>
  249. <div>
  250. <script type="text/javascript"><!--
  251. allClassesLink = document.getElementById("allclasses_navbar_bottom");
  252. if(window==top) {
  253. allClassesLink.style.display = "block";
  254. }
  255. else {
  256. allClassesLink.style.display = "none";
  257. }
  258. //-->
  259. </script>
  260. </div>
  261. <div>
  262. <ul class="subNavList">
  263. <li>Summary:&nbsp;</li>
  264. <li>Nested&nbsp;|&nbsp;</li>
  265. <li>Field&nbsp;|&nbsp;</li>
  266. <li>Constr&nbsp;|&nbsp;</li>
  267. <li><a href="#method.summary">Method</a></li>
  268. </ul>
  269. <ul class="subNavList">
  270. <li>Detail:&nbsp;</li>
  271. <li>Field&nbsp;|&nbsp;</li>
  272. <li>Constr&nbsp;|&nbsp;</li>
  273. <li><a href="#method.detail">Method</a></li>
  274. </ul>
  275. </div>
  276. <a name="skip.navbar.bottom">
  277. <!-- -->
  278. </a></div>
  279. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  280. <p class="legalCopy"><small>Copyright &#169; 2002&#x2013;2017 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
  281. </body>
  282. </html>