Charsets.html 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482
  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. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  6. <title>Charsets (Apache Commons Compress 1.13 API)</title>
  7. <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
  8. </head>
  9. <body>
  10. <script type="text/javascript"><!--
  11. try {
  12. if (location.href.indexOf('is-external=true') == -1) {
  13. parent.document.title="Charsets (Apache Commons Compress 1.13 API)";
  14. }
  15. }
  16. catch(err) {
  17. }
  18. //-->
  19. </script>
  20. <noscript>
  21. <div>JavaScript is disabled on your browser.</div>
  22. </noscript>
  23. <!-- ========= START OF TOP NAVBAR ======= -->
  24. <div class="topNav"><a name="navbar_top">
  25. <!-- -->
  26. </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
  27. <!-- -->
  28. </a>
  29. <ul class="navList" title="Navigation">
  30. <li><a href="../../../../../overview-summary.html">Overview</a></li>
  31. <li><a href="package-summary.html">Package</a></li>
  32. <li class="navBarCell1Rev">Class</li>
  33. <li><a href="class-use/Charsets.html">Use</a></li>
  34. <li><a href="package-tree.html">Tree</a></li>
  35. <li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
  36. <li><a href="../../../../../index-all.html">Index</a></li>
  37. <li><a href="../../../../../help-doc.html">Help</a></li>
  38. </ul>
  39. </div>
  40. <div class="subNav">
  41. <ul class="navList">
  42. <li><a href="../../../../../org/apache/commons/compress/utils/CharsetNames.html" title="class in org.apache.commons.compress.utils"><span class="strong">Prev Class</span></a></li>
  43. <li><a href="../../../../../org/apache/commons/compress/utils/ChecksumVerifyingInputStream.html" title="class in org.apache.commons.compress.utils"><span class="strong">Next Class</span></a></li>
  44. </ul>
  45. <ul class="navList">
  46. <li><a href="../../../../../index.html?org/apache/commons/compress/utils/Charsets.html" target="_top">Frames</a></li>
  47. <li><a href="Charsets.html" target="_top">No Frames</a></li>
  48. </ul>
  49. <ul class="navList" id="allclasses_navbar_top">
  50. <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
  51. </ul>
  52. <div>
  53. <script type="text/javascript"><!--
  54. allClassesLink = document.getElementById("allclasses_navbar_top");
  55. if(window==top) {
  56. allClassesLink.style.display = "block";
  57. }
  58. else {
  59. allClassesLink.style.display = "none";
  60. }
  61. //-->
  62. </script>
  63. </div>
  64. <div>
  65. <ul class="subNavList">
  66. <li>Summary:&nbsp;</li>
  67. <li>Nested&nbsp;|&nbsp;</li>
  68. <li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
  69. <li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
  70. <li><a href="#method_summary">Method</a></li>
  71. </ul>
  72. <ul class="subNavList">
  73. <li>Detail:&nbsp;</li>
  74. <li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
  75. <li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
  76. <li><a href="#method_detail">Method</a></li>
  77. </ul>
  78. </div>
  79. <a name="skip-navbar_top">
  80. <!-- -->
  81. </a></div>
  82. <!-- ========= END OF TOP NAVBAR ========= -->
  83. <!-- ======== START OF CLASS DATA ======== -->
  84. <div class="header">
  85. <div class="subTitle">org.apache.commons.compress.utils</div>
  86. <h2 title="Class Charsets" class="title">Class Charsets</h2>
  87. </div>
  88. <div class="contentContainer">
  89. <ul class="inheritance">
  90. <li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
  91. <li>
  92. <ul class="inheritance">
  93. <li>org.apache.commons.compress.utils.Charsets</li>
  94. </ul>
  95. </li>
  96. </ul>
  97. <div class="description">
  98. <ul class="blockList">
  99. <li class="blockList">
  100. <hr>
  101. <br>
  102. <pre>public class <a href="../../../../../src-html/org/apache/commons/compress/utils/Charsets.html#line.57">Charsets</a>
  103. extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
  104. <div class="block">Charsets required of every implementation of the Java platform.
  105. From the Java documentation <a href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard
  106. charsets</a>:
  107. <p>
  108. <cite>Every implementation of the Java platform is required to support the following character encodings. Consult the
  109. release documentation for your implementation to see if any other encodings are supported. Consult the release
  110. documentation for your implementation to see if any other encodings are supported. </cite>
  111. </p>
  112. <dl>
  113. <dt><code>US-ASCII</code></dt>
  114. <dd>Seven-bit ASCII, a.k.a. ISO646-US, a.k.a. the Basic Latin block of the Unicode character set.</dd>
  115. <dt><code>ISO-8859-1</code></dt>
  116. <dd>ISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1.</dd>
  117. <dt><code>UTF-8</code></dt>
  118. <dd>Eight-bit Unicode Transformation Format.</dd>
  119. <dt><code>UTF-16BE</code></dt>
  120. <dd>Sixteen-bit Unicode Transformation Format, big-endian byte order.</dd>
  121. <dt><code>UTF-16LE</code></dt>
  122. <dd>Sixteen-bit Unicode Transformation Format, little-endian byte order.</dd>
  123. <dt><code>UTF-16</code></dt>
  124. <dd>Sixteen-bit Unicode Transformation Format, byte order specified by a mandatory initial byte-order mark (either order
  125. accepted on input, big-endian used on output.)</dd>
  126. </dl>
  127. <p>This class best belongs in the Commons Lang or IO project. Even if a similar class is defined in another Commons
  128. component, it is not foreseen that Commons Compress would be made to depend on another Commons component.</p></div>
  129. <dl><dt><span class="strong">Since:</span></dt>
  130. <dd>1.4</dd>
  131. <dt><span class="strong">Version:</span></dt>
  132. <dd>$Id$</dd>
  133. <dt><span class="strong">See Also:</span></dt><dd><a href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a></dd></dl>
  134. </li>
  135. </ul>
  136. </div>
  137. <div class="summary">
  138. <ul class="blockList">
  139. <li class="blockList">
  140. <!-- =========== FIELD SUMMARY =========== -->
  141. <ul class="blockList">
  142. <li class="blockList"><a name="field_summary">
  143. <!-- -->
  144. </a>
  145. <h3>Field Summary</h3>
  146. <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
  147. <caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
  148. <tr>
  149. <th class="colFirst" scope="col">Modifier and Type</th>
  150. <th class="colLast" scope="col">Field and Description</th>
  151. </tr>
  152. <tr class="altColor">
  153. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a></code></td>
  154. <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/compress/utils/Charsets.html#ISO_8859_1">ISO_8859_1</a></strong></code>
  155. <div class="block">CharsetNamesISO Latin Alphabet No. 1, a.k.a.</div>
  156. </td>
  157. </tr>
  158. <tr class="rowColor">
  159. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a></code></td>
  160. <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/compress/utils/Charsets.html#US_ASCII">US_ASCII</a></strong></code>
  161. <div class="block">
  162. Seven-bit ASCII, also known as ISO646-US, also known as the Basic Latin block of the Unicode character set.</div>
  163. </td>
  164. </tr>
  165. <tr class="altColor">
  166. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a></code></td>
  167. <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/compress/utils/Charsets.html#UTF_16">UTF_16</a></strong></code>
  168. <div class="block">
  169. Sixteen-bit Unicode Transformation Format, The byte order specified by a mandatory initial byte-order mark
  170. (either order accepted on input, big-endian used on output)
  171. Every implementation of the Java platform is required to support this character encoding.</div>
  172. </td>
  173. </tr>
  174. <tr class="rowColor">
  175. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a></code></td>
  176. <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/compress/utils/Charsets.html#UTF_16BE">UTF_16BE</a></strong></code>
  177. <div class="block">
  178. Sixteen-bit Unicode Transformation Format, big-endian byte order.</div>
  179. </td>
  180. </tr>
  181. <tr class="altColor">
  182. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a></code></td>
  183. <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/compress/utils/Charsets.html#UTF_16LE">UTF_16LE</a></strong></code>
  184. <div class="block">
  185. Sixteen-bit Unicode Transformation Format, little-endian byte order.</div>
  186. </td>
  187. </tr>
  188. <tr class="rowColor">
  189. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a></code></td>
  190. <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/compress/utils/Charsets.html#UTF_8">UTF_8</a></strong></code>
  191. <div class="block">
  192. Eight-bit Unicode Transformation Format.</div>
  193. </td>
  194. </tr>
  195. </table>
  196. </li>
  197. </ul>
  198. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  199. <ul class="blockList">
  200. <li class="blockList"><a name="constructor_summary">
  201. <!-- -->
  202. </a>
  203. <h3>Constructor Summary</h3>
  204. <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
  205. <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
  206. <tr>
  207. <th class="colOne" scope="col">Constructor and Description</th>
  208. </tr>
  209. <tr class="altColor">
  210. <td class="colOne"><code><strong><a href="../../../../../org/apache/commons/compress/utils/Charsets.html#Charsets()">Charsets</a></strong>()</code>&nbsp;</td>
  211. </tr>
  212. </table>
  213. </li>
  214. </ul>
  215. <!-- ========== METHOD SUMMARY =========== -->
  216. <ul class="blockList">
  217. <li class="blockList"><a name="method_summary">
  218. <!-- -->
  219. </a>
  220. <h3>Method Summary</h3>
  221. <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
  222. <caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
  223. <tr>
  224. <th class="colFirst" scope="col">Modifier and Type</th>
  225. <th class="colLast" scope="col">Method and Description</th>
  226. </tr>
  227. <tr class="altColor">
  228. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a></code></td>
  229. <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/compress/utils/Charsets.html#toCharset(java.nio.charset.Charset)">toCharset</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;charset)</code>
  230. <div class="block">Returns the given Charset or the default Charset if the given Charset is null.</div>
  231. </td>
  232. </tr>
  233. <tr class="rowColor">
  234. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a></code></td>
  235. <td class="colLast"><code><strong><a href="../../../../../org/apache/commons/compress/utils/Charsets.html#toCharset(java.lang.String)">toCharset</a></strong>(<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;charset)</code>
  236. <div class="block">Returns a Charset for the named charset.</div>
  237. </td>
  238. </tr>
  239. </table>
  240. <ul class="blockList">
  241. <li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
  242. <!-- -->
  243. </a>
  244. <h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
  245. <code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long,%20int)" title="class or interface in java.lang">wait</a></code></li>
  246. </ul>
  247. </li>
  248. </ul>
  249. </li>
  250. </ul>
  251. </div>
  252. <div class="details">
  253. <ul class="blockList">
  254. <li class="blockList">
  255. <!-- ============ FIELD DETAIL =========== -->
  256. <ul class="blockList">
  257. <li class="blockList"><a name="field_detail">
  258. <!-- -->
  259. </a>
  260. <h3>Field Detail</h3>
  261. <a name="ISO_8859_1">
  262. <!-- -->
  263. </a>
  264. <ul class="blockList">
  265. <li class="blockList">
  266. <h4>ISO_8859_1</h4>
  267. <pre>public static final&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> <a href="../../../../../src-html/org/apache/commons/compress/utils/Charsets.html#line.98">ISO_8859_1</a></pre>
  268. <div class="block">CharsetNamesISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1.
  269. <p>
  270. Every implementation of the Java platform is required to support this character encoding.
  271. </p></div>
  272. <dl><dt><span class="strong">See Also:</span></dt><dd><a href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a></dd></dl>
  273. </li>
  274. </ul>
  275. <a name="US_ASCII">
  276. <!-- -->
  277. </a>
  278. <ul class="blockList">
  279. <li class="blockList">
  280. <h4>US_ASCII</h4>
  281. <pre>public static final&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> <a href="../../../../../src-html/org/apache/commons/compress/utils/Charsets.html#line.110">US_ASCII</a></pre>
  282. <div class="block"><p>
  283. Seven-bit ASCII, also known as ISO646-US, also known as the Basic Latin block of the Unicode character set.
  284. </p>
  285. <p>
  286. Every implementation of the Java platform is required to support this character encoding.
  287. </p></div>
  288. <dl><dt><span class="strong">See Also:</span></dt><dd><a href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a></dd></dl>
  289. </li>
  290. </ul>
  291. <a name="UTF_16">
  292. <!-- -->
  293. </a>
  294. <ul class="blockList">
  295. <li class="blockList">
  296. <h4>UTF_16</h4>
  297. <pre>public static final&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> <a href="../../../../../src-html/org/apache/commons/compress/utils/Charsets.html#line.123">UTF_16</a></pre>
  298. <div class="block"><p>
  299. Sixteen-bit Unicode Transformation Format, The byte order specified by a mandatory initial byte-order mark
  300. (either order accepted on input, big-endian used on output)
  301. </p>
  302. <p>
  303. Every implementation of the Java platform is required to support this character encoding.
  304. </p></div>
  305. <dl><dt><span class="strong">See Also:</span></dt><dd><a href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a></dd></dl>
  306. </li>
  307. </ul>
  308. <a name="UTF_16BE">
  309. <!-- -->
  310. </a>
  311. <ul class="blockList">
  312. <li class="blockList">
  313. <h4>UTF_16BE</h4>
  314. <pre>public static final&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> <a href="../../../../../src-html/org/apache/commons/compress/utils/Charsets.html#line.135">UTF_16BE</a></pre>
  315. <div class="block"><p>
  316. Sixteen-bit Unicode Transformation Format, big-endian byte order.
  317. </p>
  318. <p>
  319. Every implementation of the Java platform is required to support this character encoding.
  320. </p></div>
  321. <dl><dt><span class="strong">See Also:</span></dt><dd><a href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a></dd></dl>
  322. </li>
  323. </ul>
  324. <a name="UTF_16LE">
  325. <!-- -->
  326. </a>
  327. <ul class="blockList">
  328. <li class="blockList">
  329. <h4>UTF_16LE</h4>
  330. <pre>public static final&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> <a href="../../../../../src-html/org/apache/commons/compress/utils/Charsets.html#line.147">UTF_16LE</a></pre>
  331. <div class="block"><p>
  332. Sixteen-bit Unicode Transformation Format, little-endian byte order.
  333. </p>
  334. <p>
  335. Every implementation of the Java platform is required to support this character encoding.
  336. </p></div>
  337. <dl><dt><span class="strong">See Also:</span></dt><dd><a href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a></dd></dl>
  338. </li>
  339. </ul>
  340. <a name="UTF_8">
  341. <!-- -->
  342. </a>
  343. <ul class="blockListLast">
  344. <li class="blockList">
  345. <h4>UTF_8</h4>
  346. <pre>public static final&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a> <a href="../../../../../src-html/org/apache/commons/compress/utils/Charsets.html#line.159">UTF_8</a></pre>
  347. <div class="block"><p>
  348. Eight-bit Unicode Transformation Format.
  349. </p>
  350. <p>
  351. Every implementation of the Java platform is required to support this character encoding.
  352. </p></div>
  353. <dl><dt><span class="strong">See Also:</span></dt><dd><a href="http://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a></dd></dl>
  354. </li>
  355. </ul>
  356. </li>
  357. </ul>
  358. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  359. <ul class="blockList">
  360. <li class="blockList"><a name="constructor_detail">
  361. <!-- -->
  362. </a>
  363. <h3>Constructor Detail</h3>
  364. <a name="Charsets()">
  365. <!-- -->
  366. </a>
  367. <ul class="blockListLast">
  368. <li class="blockList">
  369. <h4>Charsets</h4>
  370. <pre>public&nbsp;<a href="../../../../../src-html/org/apache/commons/compress/utils/Charsets.html#line.57">Charsets</a>()</pre>
  371. </li>
  372. </ul>
  373. </li>
  374. </ul>
  375. <!-- ============ METHOD DETAIL ========== -->
  376. <ul class="blockList">
  377. <li class="blockList"><a name="method_detail">
  378. <!-- -->
  379. </a>
  380. <h3>Method Detail</h3>
  381. <a name="toCharset(java.nio.charset.Charset)">
  382. <!-- -->
  383. </a>
  384. <ul class="blockList">
  385. <li class="blockList">
  386. <h4>toCharset</h4>
  387. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;<a href="../../../../../src-html/org/apache/commons/compress/utils/Charsets.html#line.71">toCharset</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;charset)</pre>
  388. <div class="block">Returns the given Charset or the default Charset if the given Charset is null.</div>
  389. <dl><dt><span class="strong">Parameters:</span></dt><dd><code>charset</code> - A charset or null.</dd>
  390. <dt><span class="strong">Returns:</span></dt><dd>the given Charset or the default Charset if the given Charset is null</dd></dl>
  391. </li>
  392. </ul>
  393. <a name="toCharset(java.lang.String)">
  394. <!-- -->
  395. </a>
  396. <ul class="blockListLast">
  397. <li class="blockList">
  398. <h4>toCharset</h4>
  399. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;<a href="../../../../../src-html/org/apache/commons/compress/utils/Charsets.html#line.86">toCharset</a>(<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;charset)</pre>
  400. <div class="block">Returns a Charset for the named charset. If the name is null, return the default Charset.</div>
  401. <dl><dt><span class="strong">Parameters:</span></dt><dd><code>charset</code> - The name of the requested charset, may be null.</dd>
  402. <dt><span class="strong">Returns:</span></dt><dd>a Charset for the named charset</dd>
  403. <dt><span class="strong">Throws:</span></dt>
  404. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - If the named charset is unavailable</dd>
  405. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/IllegalCharsetNameException.html?is-external=true" title="class or interface in java.nio.charset">IllegalCharsetNameException</a></code> - If the given charset name is illegal</dd></dl>
  406. </li>
  407. </ul>
  408. </li>
  409. </ul>
  410. </li>
  411. </ul>
  412. </div>
  413. </div>
  414. <!-- ========= END OF CLASS DATA ========= -->
  415. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  416. <div class="bottomNav"><a name="navbar_bottom">
  417. <!-- -->
  418. </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
  419. <!-- -->
  420. </a>
  421. <ul class="navList" title="Navigation">
  422. <li><a href="../../../../../overview-summary.html">Overview</a></li>
  423. <li><a href="package-summary.html">Package</a></li>
  424. <li class="navBarCell1Rev">Class</li>
  425. <li><a href="class-use/Charsets.html">Use</a></li>
  426. <li><a href="package-tree.html">Tree</a></li>
  427. <li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
  428. <li><a href="../../../../../index-all.html">Index</a></li>
  429. <li><a href="../../../../../help-doc.html">Help</a></li>
  430. </ul>
  431. </div>
  432. <div class="subNav">
  433. <ul class="navList">
  434. <li><a href="../../../../../org/apache/commons/compress/utils/CharsetNames.html" title="class in org.apache.commons.compress.utils"><span class="strong">Prev Class</span></a></li>
  435. <li><a href="../../../../../org/apache/commons/compress/utils/ChecksumVerifyingInputStream.html" title="class in org.apache.commons.compress.utils"><span class="strong">Next Class</span></a></li>
  436. </ul>
  437. <ul class="navList">
  438. <li><a href="../../../../../index.html?org/apache/commons/compress/utils/Charsets.html" target="_top">Frames</a></li>
  439. <li><a href="Charsets.html" target="_top">No Frames</a></li>
  440. </ul>
  441. <ul class="navList" id="allclasses_navbar_bottom">
  442. <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
  443. </ul>
  444. <div>
  445. <script type="text/javascript"><!--
  446. allClassesLink = document.getElementById("allclasses_navbar_bottom");
  447. if(window==top) {
  448. allClassesLink.style.display = "block";
  449. }
  450. else {
  451. allClassesLink.style.display = "none";
  452. }
  453. //-->
  454. </script>
  455. </div>
  456. <div>
  457. <ul class="subNavList">
  458. <li>Summary:&nbsp;</li>
  459. <li>Nested&nbsp;|&nbsp;</li>
  460. <li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
  461. <li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
  462. <li><a href="#method_summary">Method</a></li>
  463. </ul>
  464. <ul class="subNavList">
  465. <li>Detail:&nbsp;</li>
  466. <li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
  467. <li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
  468. <li><a href="#method_detail">Method</a></li>
  469. </ul>
  470. </div>
  471. <a name="skip-navbar_bottom">
  472. <!-- -->
  473. </a></div>
  474. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  475. <p class="legalCopy"><small>Copyright &#169; 2016 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
  476. </body>
  477. </html>