1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2<!-- NewPage --> 3<html lang="en"> 4<head> 5<!-- Generated by javadoc (version 1.7.0_10-ea) on Sun Jul 14 20:03:19 PDT 2013 --> 6<title>Base64Variants (Jackson JSON Processor)</title> 7<meta name="date" content="2013-07-14"> 8<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style"> 9</head> 10<body> 11<script type="text/javascript"><!-- 12 if (location.href.indexOf('is-external=true') == -1) { 13 parent.document.title="Base64Variants (Jackson JSON Processor)"; 14 } 15//--> 16</script> 17<noscript> 18<div>JavaScript is disabled on your browser.</div> 19</noscript> 20<!-- ========= START OF TOP NAVBAR ======= --> 21<div class="topNav"><a name="navbar_top"> 22<!-- --> 23</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> 24<!-- --> 25</a> 26<ul class="navList" title="Navigation"> 27<li><a href="../../../overview-summary.html">Overview</a></li> 28<li><a href="package-summary.html">Package</a></li> 29<li class="navBarCell1Rev">Class</li> 30<li><a href="class-use/Base64Variants.html">Use</a></li> 31<li><a href="package-tree.html">Tree</a></li> 32<li><a href="../../../deprecated-list.html">Deprecated</a></li> 33<li><a href="../../../index-all.html">Index</a></li> 34<li><a href="../../../help-doc.html">Help</a></li> 35</ul> 36</div> 37<div class="subNav"> 38<ul class="navList"> 39<li><a href="../../../org/codehaus/jackson/Base64Variant.html" title="class in org.codehaus.jackson"><span class="strong">Prev Class</span></a></li> 40<li><a href="../../../org/codehaus/jackson/FormatSchema.html" title="interface in org.codehaus.jackson"><span class="strong">Next Class</span></a></li> 41</ul> 42<ul class="navList"> 43<li><a href="../../../index.html?org/codehaus/jackson/Base64Variants.html" target="_top">Frames</a></li> 44<li><a href="Base64Variants.html" target="_top">No Frames</a></li> 45</ul> 46<ul class="navList" id="allclasses_navbar_top"> 47<li><a href="../../../allclasses-noframe.html">All Classes</a></li> 48</ul> 49<div> 50<script type="text/javascript"><!-- 51 allClassesLink = document.getElementById("allclasses_navbar_top"); 52 if(window==top) { 53 allClassesLink.style.display = "block"; 54 } 55 else { 56 allClassesLink.style.display = "none"; 57 } 58 //--> 59</script> 60</div> 61<div> 62<ul class="subNavList"> 63<li>Summary: </li> 64<li>Nested | </li> 65<li><a href="#field_summary">Field</a> | </li> 66<li><a href="#constructor_summary">Constr</a> | </li> 67<li><a href="#method_summary">Method</a></li> 68</ul> 69<ul class="subNavList"> 70<li>Detail: </li> 71<li><a href="#field_detail">Field</a> | </li> 72<li><a href="#constructor_detail">Constr</a> | </li> 73<li><a href="#method_detail">Method</a></li> 74</ul> 75</div> 76<a name="skip-navbar_top"> 77<!-- --> 78</a></div> 79<!-- ========= END OF TOP NAVBAR ========= --> 80<!-- ======== START OF CLASS DATA ======== --> 81<div class="header"> 82<div class="subTitle">org.codehaus.jackson</div> 83<h2 title="Class Base64Variants" class="title">Class Base64Variants</h2> 84</div> 85<div class="contentContainer"> 86<ul class="inheritance"> 87<li><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> 88<li> 89<ul class="inheritance"> 90<li>org.codehaus.jackson.Base64Variants</li> 91</ul> 92</li> 93</ul> 94<div class="description"> 95<ul class="blockList"> 96<li class="blockList"> 97<hr> 98<br> 99<pre>public final class <span class="strong">Base64Variants</span> 100extends <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> 101<div class="block">Container for commonly used Base64 variants.</div> 102<dl><dt><span class="strong">Author:</span></dt> 103 <dd>Tatu Saloranta</dd></dl> 104</li> 105</ul> 106</div> 107<div class="summary"> 108<ul class="blockList"> 109<li class="blockList"> 110<!-- =========== FIELD SUMMARY =========== --> 111<ul class="blockList"> 112<li class="blockList"><a name="field_summary"> 113<!-- --> 114</a> 115<h3>Field Summary</h3> 116<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> 117<caption><span>Fields</span><span class="tabEnd"> </span></caption> 118<tr> 119<th class="colFirst" scope="col">Modifier and Type</th> 120<th class="colLast" scope="col">Field and Description</th> 121</tr> 122<tr class="altColor"> 123<td class="colFirst"><code>static <a href="../../../org/codehaus/jackson/Base64Variant.html" title="class in org.codehaus.jackson">Base64Variant</a></code></td> 124<td class="colLast"><code><strong><a href="../../../org/codehaus/jackson/Base64Variants.html#MIME">MIME</a></strong></code> 125<div class="block">This variant is what most people would think of "the standard" 126 Base64 encoding.</div> 127</td> 128</tr> 129<tr class="rowColor"> 130<td class="colFirst"><code>static <a href="../../../org/codehaus/jackson/Base64Variant.html" title="class in org.codehaus.jackson">Base64Variant</a></code></td> 131<td class="colLast"><code><strong><a href="../../../org/codehaus/jackson/Base64Variants.html#MIME_NO_LINEFEEDS">MIME_NO_LINEFEEDS</a></strong></code> 132<div class="block">Slightly non-standard modification of <a href="../../../org/codehaus/jackson/Base64Variants.html#MIME"><code>MIME</code></a> which does not 133 use linefeeds (max line length set to infinite).</div> 134</td> 135</tr> 136<tr class="altColor"> 137<td class="colFirst"><code>static <a href="../../../org/codehaus/jackson/Base64Variant.html" title="class in org.codehaus.jackson">Base64Variant</a></code></td> 138<td class="colLast"><code><strong><a href="../../../org/codehaus/jackson/Base64Variants.html#MODIFIED_FOR_URL">MODIFIED_FOR_URL</a></strong></code> 139<div class="block">This non-standard variant is usually used when encoded data needs to be 140 passed via URLs (such as part of GET request).</div> 141</td> 142</tr> 143<tr class="rowColor"> 144<td class="colFirst"><code>static <a href="../../../org/codehaus/jackson/Base64Variant.html" title="class in org.codehaus.jackson">Base64Variant</a></code></td> 145<td class="colLast"><code><strong><a href="../../../org/codehaus/jackson/Base64Variants.html#PEM">PEM</a></strong></code> 146<div class="block">This variant is the one that predates <a href="../../../org/codehaus/jackson/Base64Variants.html#MIME"><code>MIME</code></a>: it is otherwise 147 identical, except that it mandates shorter line length.</div> 148</td> 149</tr> 150</table> 151</li> 152</ul> 153<!-- ======== CONSTRUCTOR SUMMARY ======== --> 154<ul class="blockList"> 155<li class="blockList"><a name="constructor_summary"> 156<!-- --> 157</a> 158<h3>Constructor Summary</h3> 159<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> 160<caption><span>Constructors</span><span class="tabEnd"> </span></caption> 161<tr> 162<th class="colOne" scope="col">Constructor and Description</th> 163</tr> 164<tr class="altColor"> 165<td class="colOne"><code><strong><a href="../../../org/codehaus/jackson/Base64Variants.html#Base64Variants()">Base64Variants</a></strong>()</code> </td> 166</tr> 167</table> 168</li> 169</ul> 170<!-- ========== METHOD SUMMARY =========== --> 171<ul class="blockList"> 172<li class="blockList"><a name="method_summary"> 173<!-- --> 174</a> 175<h3>Method Summary</h3> 176<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> 177<caption><span>Methods</span><span class="tabEnd"> </span></caption> 178<tr> 179<th class="colFirst" scope="col">Modifier and Type</th> 180<th class="colLast" scope="col">Method and Description</th> 181</tr> 182<tr class="altColor"> 183<td class="colFirst"><code>static <a href="../../../org/codehaus/jackson/Base64Variant.html" title="class in org.codehaus.jackson">Base64Variant</a></code></td> 184<td class="colLast"><code><strong><a href="../../../org/codehaus/jackson/Base64Variants.html#getDefaultVariant()">getDefaultVariant</a></strong>()</code> 185<div class="block">Method used to get the default variant ("MIME_NO_LINEFEEDS") for cases 186 where caller does not explicitly specify the variant.</div> 187</td> 188</tr> 189</table> 190<ul class="blockList"> 191<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object"> 192<!-- --> 193</a> 194<h3>Methods inherited from class java.lang.<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> 195<code><a href="http://docs.oracle.com/javase/6/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/6/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/6/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/6/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/6/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/6/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/6/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/6/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/6/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/6/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/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></code></li> 196</ul> 197</li> 198</ul> 199</li> 200</ul> 201</div> 202<div class="details"> 203<ul class="blockList"> 204<li class="blockList"> 205<!-- ============ FIELD DETAIL =========== --> 206<ul class="blockList"> 207<li class="blockList"><a name="field_detail"> 208<!-- --> 209</a> 210<h3>Field Detail</h3> 211<a name="MIME"> 212<!-- --> 213</a> 214<ul class="blockList"> 215<li class="blockList"> 216<h4>MIME</h4> 217<pre>public static final <a href="../../../org/codehaus/jackson/Base64Variant.html" title="class in org.codehaus.jackson">Base64Variant</a> MIME</pre> 218<div class="block">This variant is what most people would think of "the standard" 219 Base64 encoding. 220<p> 221 See <a href="">wikipedia Base64 entry</a> for details. 222<p> 223 Note that although this can be thought of as the standard variant, 224 it is <b>not</b> the default for Jackson: no-linefeeds alternative 225 is because of JSON requirement of escaping all linefeeds.</div> 226</li> 227</ul> 228<a name="MIME_NO_LINEFEEDS"> 229<!-- --> 230</a> 231<ul class="blockList"> 232<li class="blockList"> 233<h4>MIME_NO_LINEFEEDS</h4> 234<pre>public static final <a href="../../../org/codehaus/jackson/Base64Variant.html" title="class in org.codehaus.jackson">Base64Variant</a> MIME_NO_LINEFEEDS</pre> 235<div class="block">Slightly non-standard modification of <a href="../../../org/codehaus/jackson/Base64Variants.html#MIME"><code>MIME</code></a> which does not 236 use linefeeds (max line length set to infinite). Useful when linefeeds 237 wouldn't work well (possibly in attributes), or for minor space savings 238 (save 1 linefeed per 76 data chars, ie. ~1.4% savings).</div> 239</li> 240</ul> 241<a name="PEM"> 242<!-- --> 243</a> 244<ul class="blockList"> 245<li class="blockList"> 246<h4>PEM</h4> 247<pre>public static final <a href="../../../org/codehaus/jackson/Base64Variant.html" title="class in org.codehaus.jackson">Base64Variant</a> PEM</pre> 248<div class="block">This variant is the one that predates <a href="../../../org/codehaus/jackson/Base64Variants.html#MIME"><code>MIME</code></a>: it is otherwise 249 identical, except that it mandates shorter line length.</div> 250</li> 251</ul> 252<a name="MODIFIED_FOR_URL"> 253<!-- --> 254</a> 255<ul class="blockListLast"> 256<li class="blockList"> 257<h4>MODIFIED_FOR_URL</h4> 258<pre>public static final <a href="../../../org/codehaus/jackson/Base64Variant.html" title="class in org.codehaus.jackson">Base64Variant</a> MODIFIED_FOR_URL</pre> 259<div class="block">This non-standard variant is usually used when encoded data needs to be 260 passed via URLs (such as part of GET request). It differs from the 261 base <a href="../../../org/codehaus/jackson/Base64Variants.html#MIME"><code>MIME</code></a> variant in multiple ways. 262 First, no padding is used: this also means that it generally can not 263 be written in multiple separate but adjacent chunks (which would not 264 be the usual use case in any case). Also, no linefeeds are used (max 265 line length set to infinite). And finally, two characters (plus and 266 slash) that would need quoting in URLs are replaced with more 267 optimal alternatives (hyphen and underscore, respectively).</div> 268</li> 269</ul> 270</li> 271</ul> 272<!-- ========= CONSTRUCTOR DETAIL ======== --> 273<ul class="blockList"> 274<li class="blockList"><a name="constructor_detail"> 275<!-- --> 276</a> 277<h3>Constructor Detail</h3> 278<a name="Base64Variants()"> 279<!-- --> 280</a> 281<ul class="blockListLast"> 282<li class="blockList"> 283<h4>Base64Variants</h4> 284<pre>public Base64Variants()</pre> 285</li> 286</ul> 287</li> 288</ul> 289<!-- ============ METHOD DETAIL ========== --> 290<ul class="blockList"> 291<li class="blockList"><a name="method_detail"> 292<!-- --> 293</a> 294<h3>Method Detail</h3> 295<a name="getDefaultVariant()"> 296<!-- --> 297</a> 298<ul class="blockListLast"> 299<li class="blockList"> 300<h4>getDefaultVariant</h4> 301<pre>public static <a href="../../../org/codehaus/jackson/Base64Variant.html" title="class in org.codehaus.jackson">Base64Variant</a> getDefaultVariant()</pre> 302<div class="block">Method used to get the default variant ("MIME_NO_LINEFEEDS") for cases 303 where caller does not explicitly specify the variant. 304 We will prefer no-linefeed version because linefeeds in JSON values 305 must be escaped, making linefeed-containing variants sub-optimal.</div> 306</li> 307</ul> 308</li> 309</ul> 310</li> 311</ul> 312</div> 313</div> 314<!-- ========= END OF CLASS DATA ========= --> 315<!-- ======= START OF BOTTOM NAVBAR ====== --> 316<div class="bottomNav"><a name="navbar_bottom"> 317<!-- --> 318</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> 319<!-- --> 320</a> 321<ul class="navList" title="Navigation"> 322<li><a href="../../../overview-summary.html">Overview</a></li> 323<li><a href="package-summary.html">Package</a></li> 324<li class="navBarCell1Rev">Class</li> 325<li><a href="class-use/Base64Variants.html">Use</a></li> 326<li><a href="package-tree.html">Tree</a></li> 327<li><a href="../../../deprecated-list.html">Deprecated</a></li> 328<li><a href="../../../index-all.html">Index</a></li> 329<li><a href="../../../help-doc.html">Help</a></li> 330</ul> 331</div> 332<div class="subNav"> 333<ul class="navList"> 334<li><a href="../../../org/codehaus/jackson/Base64Variant.html" title="class in org.codehaus.jackson"><span class="strong">Prev Class</span></a></li> 335<li><a href="../../../org/codehaus/jackson/FormatSchema.html" title="interface in org.codehaus.jackson"><span class="strong">Next Class</span></a></li> 336</ul> 337<ul class="navList"> 338<li><a href="../../../index.html?org/codehaus/jackson/Base64Variants.html" target="_top">Frames</a></li> 339<li><a href="Base64Variants.html" target="_top">No Frames</a></li> 340</ul> 341<ul class="navList" id="allclasses_navbar_bottom"> 342<li><a href="../../../allclasses-noframe.html">All Classes</a></li> 343</ul> 344<div> 345<script type="text/javascript"><!-- 346 allClassesLink = document.getElementById("allclasses_navbar_bottom"); 347 if(window==top) { 348 allClassesLink.style.display = "block"; 349 } 350 else { 351 allClassesLink.style.display = "none"; 352 } 353 //--> 354</script> 355</div> 356<div> 357<ul class="subNavList"> 358<li>Summary: </li> 359<li>Nested | </li> 360<li><a href="#field_summary">Field</a> | </li> 361<li><a href="#constructor_summary">Constr</a> | </li> 362<li><a href="#method_summary">Method</a></li> 363</ul> 364<ul class="subNavList"> 365<li>Detail: </li> 366<li><a href="#field_detail">Field</a> | </li> 367<li><a href="#constructor_detail">Constr</a> | </li> 368<li><a href="#method_detail">Method</a></li> 369</ul> 370</div> 371<a name="skip-navbar_bottom"> 372<!-- --> 373</a></div> 374<!-- ======== END OF BOTTOM NAVBAR ======= --> 375</body> 376</html> 377