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:27 PDT 2013 --> 6<title>ObjectWriter (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="ObjectWriter (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/ObjectWriter.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/map/ObjectReader.html" title="class in org.codehaus.jackson.map"><span class="strong">Prev Class</span></a></li> 40<li><a href="../../../../org/codehaus/jackson/map/PropertyNamingStrategy.html" title="class in org.codehaus.jackson.map"><span class="strong">Next Class</span></a></li> 41</ul> 42<ul class="navList"> 43<li><a href="../../../../index.html?org/codehaus/jackson/map/ObjectWriter.html" target="_top">Frames</a></li> 44<li><a href="ObjectWriter.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.map</div> 83<h2 title="Class ObjectWriter" class="title">Class ObjectWriter</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.map.ObjectWriter</li> 91</ul> 92</li> 93</ul> 94<div class="description"> 95<ul class="blockList"> 96<li class="blockList"> 97<dl> 98<dt>All Implemented Interfaces:</dt> 99<dd><a href="../../../../org/codehaus/jackson/Versioned.html" title="interface in org.codehaus.jackson">Versioned</a></dd> 100</dl> 101<hr> 102<br> 103<pre>public class <span class="strong">ObjectWriter</span> 104extends <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> 105implements <a href="../../../../org/codehaus/jackson/Versioned.html" title="interface in org.codehaus.jackson">Versioned</a></pre> 106<div class="block">Builder object that can be used for per-serialization configuration of 107 serialization parameters, such as JSON View and root type to use. 108 (and thus fully thread-safe with no external synchronization); 109 new instances are constructed for different configurations. 110 Instances are initially constructed by <a href="../../../../org/codehaus/jackson/map/ObjectMapper.html" title="class in org.codehaus.jackson.map"><code>ObjectMapper</code></a> and can be 111 reused in completely thread-safe manner with no explicit synchronization</div> 112<dl><dt><span class="strong">Since:</span></dt> 113 <dd>1.5</dd> 114<dt><span class="strong">Author:</span></dt> 115 <dd>tatu</dd></dl> 116</li> 117</ul> 118</div> 119<div class="summary"> 120<ul class="blockList"> 121<li class="blockList"> 122<!-- =========== FIELD SUMMARY =========== --> 123<ul class="blockList"> 124<li class="blockList"><a name="field_summary"> 125<!-- --> 126</a> 127<h3>Field Summary</h3> 128<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> 129<caption><span>Fields</span><span class="tabEnd"> </span></caption> 130<tr> 131<th class="colFirst" scope="col">Modifier and Type</th> 132<th class="colLast" scope="col">Field and Description</th> 133</tr> 134<tr class="altColor"> 135<td class="colFirst"><code>protected <a href="../../../../org/codehaus/jackson/map/SerializationConfig.html" title="class in org.codehaus.jackson.map">SerializationConfig</a></code></td> 136<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/map/ObjectWriter.html#_config">_config</a></strong></code> 137<div class="block">General serialization configuration settings</div> 138</td> 139</tr> 140<tr class="rowColor"> 141<td class="colFirst"><code>protected <a href="../../../../org/codehaus/jackson/JsonFactory.html" title="class in org.codehaus.jackson">JsonFactory</a></code></td> 142<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/map/ObjectWriter.html#_jsonFactory">_jsonFactory</a></strong></code> 143<div class="block">Factory used for constructing <a href="../../../../org/codehaus/jackson/JsonGenerator.html" title="class in org.codehaus.jackson"><code>JsonGenerator</code></a>s</div> 144</td> 145</tr> 146<tr class="altColor"> 147<td class="colFirst"><code>protected <a href="../../../../org/codehaus/jackson/PrettyPrinter.html" title="interface in org.codehaus.jackson">PrettyPrinter</a></code></td> 148<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/map/ObjectWriter.html#_prettyPrinter">_prettyPrinter</a></strong></code> 149<div class="block">To allow for dynamic enabling/disabling of pretty printing, 150 pretty printer can be optionally configured for writer 151 as well</div> 152</td> 153</tr> 154<tr class="rowColor"> 155<td class="colFirst"><code>protected <a href="../../../../org/codehaus/jackson/map/SerializerProvider.html" title="class in org.codehaus.jackson.map">SerializerProvider</a></code></td> 156<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/map/ObjectWriter.html#_provider">_provider</a></strong></code> </td> 157</tr> 158<tr class="altColor"> 159<td class="colFirst"><code>protected <a href="../../../../org/codehaus/jackson/type/JavaType.html" title="class in org.codehaus.jackson.type">JavaType</a></code></td> 160<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/map/ObjectWriter.html#_rootType">_rootType</a></strong></code> 161<div class="block">Specified root serialization type to use; can be same 162 as runtime type, but usually one of its super types</div> 163</td> 164</tr> 165<tr class="rowColor"> 166<td class="colFirst"><code>protected <a href="../../../../org/codehaus/jackson/FormatSchema.html" title="interface in org.codehaus.jackson">FormatSchema</a></code></td> 167<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/map/ObjectWriter.html#_schema">_schema</a></strong></code> 168<div class="block">When using data format that uses a schema, schema is passed 169 to generator.</div> 170</td> 171</tr> 172<tr class="altColor"> 173<td class="colFirst"><code>protected <a href="../../../../org/codehaus/jackson/map/SerializerFactory.html" title="class in org.codehaus.jackson.map">SerializerFactory</a></code></td> 174<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/map/ObjectWriter.html#_serializerFactory">_serializerFactory</a></strong></code> </td> 175</tr> 176<tr class="rowColor"> 177<td class="colFirst"><code>protected static <a href="../../../../org/codehaus/jackson/PrettyPrinter.html" title="interface in org.codehaus.jackson">PrettyPrinter</a></code></td> 178<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/map/ObjectWriter.html#NULL_PRETTY_PRINTER">NULL_PRETTY_PRINTER</a></strong></code> 179<div class="block">We need to keep track of explicit disabling of pretty printing; 180 easiest to do by a token value.</div> 181</td> 182</tr> 183</table> 184</li> 185</ul> 186<!-- ======== CONSTRUCTOR SUMMARY ======== --> 187<ul class="blockList"> 188<li class="blockList"><a name="constructor_summary"> 189<!-- --> 190</a> 191<h3>Constructor Summary</h3> 192<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> 193<caption><span>Constructors</span><span class="tabEnd"> </span></caption> 194<tr> 195<th class="colFirst" scope="col">Modifier</th> 196<th class="colLast" scope="col">Constructor and Description</th> 197</tr> 198<tr class="altColor"> 199<td class="colFirst"><code>protected </code></td> 200<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/map/ObjectWriter.html#ObjectWriter(org.codehaus.jackson.map.ObjectMapper, org.codehaus.jackson.map.SerializationConfig)">ObjectWriter</a></strong>(<a href="../../../../org/codehaus/jackson/map/ObjectMapper.html" title="class in org.codehaus.jackson.map">ObjectMapper</a> mapper, 201 <a href="../../../../org/codehaus/jackson/map/SerializationConfig.html" title="class in org.codehaus.jackson.map">SerializationConfig</a> config)</code> 202<div class="block">Alternative constructor for initial instantiation.</div> 203</td> 204</tr> 205<tr class="rowColor"> 206<td class="colFirst"><code>protected </code></td> 207<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/map/ObjectWriter.html#ObjectWriter(org.codehaus.jackson.map.ObjectMapper, org.codehaus.jackson.map.SerializationConfig, org.codehaus.jackson.FormatSchema)">ObjectWriter</a></strong>(<a href="../../../../org/codehaus/jackson/map/ObjectMapper.html" title="class in org.codehaus.jackson.map">ObjectMapper</a> mapper, 208 <a href="../../../../org/codehaus/jackson/map/SerializationConfig.html" title="class in org.codehaus.jackson.map">SerializationConfig</a> config, 209 <a href="../../../../org/codehaus/jackson/FormatSchema.html" title="interface in org.codehaus.jackson">FormatSchema</a> s)</code> 210<div class="block">Alternative constructor for initial instantiation.</div> 211</td> 212</tr> 213<tr class="altColor"> 214<td class="colFirst"><code>protected </code></td> 215<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/map/ObjectWriter.html#ObjectWriter(org.codehaus.jackson.map.ObjectMapper, org.codehaus.jackson.map.SerializationConfig, org.codehaus.jackson.type.JavaType, org.codehaus.jackson.PrettyPrinter)">ObjectWriter</a></strong>(<a href="../../../../org/codehaus/jackson/map/ObjectMapper.html" title="class in org.codehaus.jackson.map">ObjectMapper</a> mapper, 216 <a href="../../../../org/codehaus/jackson/map/SerializationConfig.html" title="class in org.codehaus.jackson.map">SerializationConfig</a> config, 217 <a href="../../../../org/codehaus/jackson/type/JavaType.html" title="class in org.codehaus.jackson.type">JavaType</a> rootType, 218 <a href="../../../../org/codehaus/jackson/PrettyPrinter.html" title="interface in org.codehaus.jackson">PrettyPrinter</a> pp)</code> 219<div class="block">Constructor used by <a href="../../../../org/codehaus/jackson/map/ObjectMapper.html" title="class in org.codehaus.jackson.map"><code>ObjectMapper</code></a> for initial instantiation</div> 220</td> 221</tr> 222<tr class="rowColor"> 223<td class="colFirst"><code>protected </code></td> 224<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/map/ObjectWriter.html#ObjectWriter(org.codehaus.jackson.map.ObjectWriter, org.codehaus.jackson.map.SerializationConfig)">ObjectWriter</a></strong>(<a href="../../../../org/codehaus/jackson/map/ObjectWriter.html" title="class in org.codehaus.jackson.map">ObjectWriter</a> base, 225 <a href="../../../../org/codehaus/jackson/map/SerializationConfig.html" title="class in org.codehaus.jackson.map">SerializationConfig</a> config)</code> 226<div class="block">Copy constructor used for building variations.</div> 227</td> 228</tr> 229<tr class="altColor"> 230<td class="colFirst"><code>protected </code></td> 231<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/map/ObjectWriter.html#ObjectWriter(org.codehaus.jackson.map.ObjectWriter, org.codehaus.jackson.map.SerializationConfig, org.codehaus.jackson.type.JavaType, org.codehaus.jackson.PrettyPrinter, org.codehaus.jackson.FormatSchema)">ObjectWriter</a></strong>(<a href="../../../../org/codehaus/jackson/map/ObjectWriter.html" title="class in org.codehaus.jackson.map">ObjectWriter</a> base, 232 <a href="../../../../org/codehaus/jackson/map/SerializationConfig.html" title="class in org.codehaus.jackson.map">SerializationConfig</a> config, 233 <a href="../../../../org/codehaus/jackson/type/JavaType.html" title="class in org.codehaus.jackson.type">JavaType</a> rootType, 234 <a href="../../../../org/codehaus/jackson/PrettyPrinter.html" title="interface in org.codehaus.jackson">PrettyPrinter</a> pp, 235 <a href="../../../../org/codehaus/jackson/FormatSchema.html" title="interface in org.codehaus.jackson">FormatSchema</a> s)</code> 236<div class="block">Copy constructor used for building variations.</div> 237</td> 238</tr> 239</table> 240</li> 241</ul> 242<!-- ========== METHOD SUMMARY =========== --> 243<ul class="blockList"> 244<li class="blockList"><a name="method_summary"> 245<!-- --> 246</a> 247<h3>Method Summary</h3> 248<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> 249<caption><span>Methods</span><span class="tabEnd"> </span></caption> 250<tr> 251<th class="colFirst" scope="col">Modifier and Type</th> 252<th class="colLast" scope="col">Method and Description</th> 253</tr> 254<tr class="altColor"> 255<td class="colFirst"><code>protected void</code></td> 256<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/map/ObjectWriter.html#_configAndWriteValue(org.codehaus.jackson.JsonGenerator, java.lang.Object)">_configAndWriteValue</a></strong>(<a href="../../../../org/codehaus/jackson/JsonGenerator.html" title="class in org.codehaus.jackson">JsonGenerator</a> jgen, 257 <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> value)</code> 258<div class="block">Method called to configure the generator as necessary and then 259 call write functionality</div> 260</td> 261</tr> 262<tr class="rowColor"> 263<td class="colFirst"><code>boolean</code></td> 264<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/map/ObjectWriter.html#canSerialize(java.lang.Class)">canSerialize</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> type)</code> </td> 265</tr> 266<tr class="altColor"> 267<td class="colFirst"><code><a href="../../../../org/codehaus/jackson/Version.html" title="class in org.codehaus.jackson">Version</a></code></td> 268<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/map/ObjectWriter.html#version()">version</a></strong>()</code> 269<div class="block">Method that will return version information stored in and read from jar 270 that contains this class.</div> 271</td> 272</tr> 273<tr class="rowColor"> 274<td class="colFirst"><code><a href="../../../../org/codehaus/jackson/map/ObjectWriter.html" title="class in org.codehaus.jackson.map">ObjectWriter</a></code></td> 275<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/map/ObjectWriter.html#withDateFormat(java.text.DateFormat)">withDateFormat</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/text/DateFormat.html?is-external=true" title="class or interface in java.text">DateFormat</a> df)</code> 276<div class="block">Fluent factory method that will construct a new writer instance that will 277 use specified date format for serializing dates; or if null passed, one 278 that will serialize dates as numeric timestamps.</div> 279</td> 280</tr> 281<tr class="altColor"> 282<td class="colFirst"><code><a href="../../../../org/codehaus/jackson/map/ObjectWriter.html" title="class in org.codehaus.jackson.map">ObjectWriter</a></code></td> 283<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/map/ObjectWriter.html#withDefaultPrettyPrinter()">withDefaultPrettyPrinter</a></strong>()</code> 284<div class="block">Method that will construct a new instance that will use the default 285 pretty printer for serialization.</div> 286</td> 287</tr> 288<tr class="rowColor"> 289<td class="colFirst"><code><a href="../../../../org/codehaus/jackson/map/ObjectWriter.html" title="class in org.codehaus.jackson.map">ObjectWriter</a></code></td> 290<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/map/ObjectWriter.html#withFilters(org.codehaus.jackson.map.ser.FilterProvider)">withFilters</a></strong>(<a href="../../../../org/codehaus/jackson/map/ser/FilterProvider.html" title="class in org.codehaus.jackson.map.ser">FilterProvider</a> filterProvider)</code> 291<div class="block">Method that will construct a new instance that uses specified 292 provider for resolving filter instances by id.</div> 293</td> 294</tr> 295<tr class="altColor"> 296<td class="colFirst"><code><a href="../../../../org/codehaus/jackson/map/ObjectWriter.html" title="class in org.codehaus.jackson.map">ObjectWriter</a></code></td> 297<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/map/ObjectWriter.html#withPrettyPrinter(org.codehaus.jackson.PrettyPrinter)">withPrettyPrinter</a></strong>(<a href="../../../../org/codehaus/jackson/PrettyPrinter.html" title="interface in org.codehaus.jackson">PrettyPrinter</a> pp)</code> 298<div class="block">Method that will construct a new instance that will use specified pretty 299 printer (or, if null, will not do any pretty-printing)</div> 300</td> 301</tr> 302<tr class="rowColor"> 303<td class="colFirst"><code><a href="../../../../org/codehaus/jackson/map/ObjectWriter.html" title="class in org.codehaus.jackson.map">ObjectWriter</a></code></td> 304<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/map/ObjectWriter.html#withSchema(org.codehaus.jackson.FormatSchema)">withSchema</a></strong>(<a href="../../../../org/codehaus/jackson/FormatSchema.html" title="interface in org.codehaus.jackson">FormatSchema</a> schema)</code> </td> 305</tr> 306<tr class="altColor"> 307<td class="colFirst"><code><a href="../../../../org/codehaus/jackson/map/ObjectWriter.html" title="class in org.codehaus.jackson.map">ObjectWriter</a></code></td> 308<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/map/ObjectWriter.html#withType(java.lang.Class)">withType</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> rootType)</code> 309<div class="block">Method that will construct a new instance that uses specific type 310 as the root type for serialization, instead of runtime dynamic 311 type of the root object itself.</div> 312</td> 313</tr> 314<tr class="rowColor"> 315<td class="colFirst"><code><a href="../../../../org/codehaus/jackson/map/ObjectWriter.html" title="class in org.codehaus.jackson.map">ObjectWriter</a></code></td> 316<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/map/ObjectWriter.html#withType(org.codehaus.jackson.type.JavaType)">withType</a></strong>(<a href="../../../../org/codehaus/jackson/type/JavaType.html" title="class in org.codehaus.jackson.type">JavaType</a> rootType)</code> 317<div class="block">Method that will construct a new instance that uses specific type 318 as the root type for serialization, instead of runtime dynamic 319 type of the root object itself.</div> 320</td> 321</tr> 322<tr class="altColor"> 323<td class="colFirst"><code><a href="../../../../org/codehaus/jackson/map/ObjectWriter.html" title="class in org.codehaus.jackson.map">ObjectWriter</a></code></td> 324<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/map/ObjectWriter.html#withType(org.codehaus.jackson.type.TypeReference)">withType</a></strong>(<a href="../../../../org/codehaus/jackson/type/TypeReference.html" title="class in org.codehaus.jackson.type">TypeReference</a><?> rootType)</code> </td> 325</tr> 326<tr class="rowColor"> 327<td class="colFirst"><code><a href="../../../../org/codehaus/jackson/map/ObjectWriter.html" title="class in org.codehaus.jackson.map">ObjectWriter</a></code></td> 328<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/map/ObjectWriter.html#withView(java.lang.Class)">withView</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> view)</code> 329<div class="block">Method that will construct a new instance that uses specified 330 serialization view for serialization (with null basically disables 331 view processing)</div> 332</td> 333</tr> 334<tr class="altColor"> 335<td class="colFirst"><code>void</code></td> 336<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/map/ObjectWriter.html#writeValue(java.io.File, java.lang.Object)">writeValue</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> resultFile, 337 <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> value)</code> 338<div class="block">Method that can be used to serialize any Java value as 339 JSON output, written to File provided.</div> 340</td> 341</tr> 342<tr class="rowColor"> 343<td class="colFirst"><code>void</code></td> 344<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/map/ObjectWriter.html#writeValue(org.codehaus.jackson.JsonGenerator, java.lang.Object)">writeValue</a></strong>(<a href="../../../../org/codehaus/jackson/JsonGenerator.html" title="class in org.codehaus.jackson">JsonGenerator</a> jgen, 345 <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> value)</code> 346<div class="block">Method that can be used to serialize any Java value as 347 JSON output, using provided <a href="../../../../org/codehaus/jackson/JsonGenerator.html" title="class in org.codehaus.jackson"><code>JsonGenerator</code></a>.</div> 348</td> 349</tr> 350<tr class="altColor"> 351<td class="colFirst"><code>void</code></td> 352<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/map/ObjectWriter.html#writeValue(java.io.OutputStream, java.lang.Object)">writeValue</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> out, 353 <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> value)</code> 354<div class="block">Method that can be used to serialize any Java value as 355 JSON output, using output stream provided (using encoding 356 <a href="../../../../org/codehaus/jackson/JsonEncoding.html#UTF8"><code>JsonEncoding.UTF8</code></a>).</div> 357</td> 358</tr> 359<tr class="rowColor"> 360<td class="colFirst"><code>void</code></td> 361<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/map/ObjectWriter.html#writeValue(java.io.Writer, java.lang.Object)">writeValue</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a> w, 362 <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> value)</code> 363<div class="block">Method that can be used to serialize any Java value as 364 JSON output, using Writer provided.</div> 365</td> 366</tr> 367<tr class="altColor"> 368<td class="colFirst"><code>byte[]</code></td> 369<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/map/ObjectWriter.html#writeValueAsBytes(java.lang.Object)">writeValueAsBytes</a></strong>(<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> value)</code> 370<div class="block">Method that can be used to serialize any Java value as 371 a byte array.</div> 372</td> 373</tr> 374<tr class="rowColor"> 375<td class="colFirst"><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> 376<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/map/ObjectWriter.html#writeValueAsString(java.lang.Object)">writeValueAsString</a></strong>(<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> value)</code> 377<div class="block">Method that can be used to serialize any Java value as 378 a String.</div> 379</td> 380</tr> 381</table> 382<ul class="blockList"> 383<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object"> 384<!-- --> 385</a> 386<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> 387<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> 388</ul> 389</li> 390</ul> 391</li> 392</ul> 393</div> 394<div class="details"> 395<ul class="blockList"> 396<li class="blockList"> 397<!-- ============ FIELD DETAIL =========== --> 398<ul class="blockList"> 399<li class="blockList"><a name="field_detail"> 400<!-- --> 401</a> 402<h3>Field Detail</h3> 403<a name="NULL_PRETTY_PRINTER"> 404<!-- --> 405</a> 406<ul class="blockList"> 407<li class="blockList"> 408<h4>NULL_PRETTY_PRINTER</h4> 409<pre>protected static final <a href="../../../../org/codehaus/jackson/PrettyPrinter.html" title="interface in org.codehaus.jackson">PrettyPrinter</a> NULL_PRETTY_PRINTER</pre> 410<div class="block">We need to keep track of explicit disabling of pretty printing; 411 easiest to do by a token value.</div> 412</li> 413</ul> 414<a name="_config"> 415<!-- --> 416</a> 417<ul class="blockList"> 418<li class="blockList"> 419<h4>_config</h4> 420<pre>protected final <a href="../../../../org/codehaus/jackson/map/SerializationConfig.html" title="class in org.codehaus.jackson.map">SerializationConfig</a> _config</pre> 421<div class="block">General serialization configuration settings</div> 422</li> 423</ul> 424<a name="_provider"> 425<!-- --> 426</a> 427<ul class="blockList"> 428<li class="blockList"> 429<h4>_provider</h4> 430<pre>protected final <a href="../../../../org/codehaus/jackson/map/SerializerProvider.html" title="class in org.codehaus.jackson.map">SerializerProvider</a> _provider</pre> 431</li> 432</ul> 433<a name="_serializerFactory"> 434<!-- --> 435</a> 436<ul class="blockList"> 437<li class="blockList"> 438<h4>_serializerFactory</h4> 439<pre>protected final <a href="../../../../org/codehaus/jackson/map/SerializerFactory.html" title="class in org.codehaus.jackson.map">SerializerFactory</a> _serializerFactory</pre> 440</li> 441</ul> 442<a name="_jsonFactory"> 443<!-- --> 444</a> 445<ul class="blockList"> 446<li class="blockList"> 447<h4>_jsonFactory</h4> 448<pre>protected final <a href="../../../../org/codehaus/jackson/JsonFactory.html" title="class in org.codehaus.jackson">JsonFactory</a> _jsonFactory</pre> 449<div class="block">Factory used for constructing <a href="../../../../org/codehaus/jackson/JsonGenerator.html" title="class in org.codehaus.jackson"><code>JsonGenerator</code></a>s</div> 450</li> 451</ul> 452<a name="_rootType"> 453<!-- --> 454</a> 455<ul class="blockList"> 456<li class="blockList"> 457<h4>_rootType</h4> 458<pre>protected final <a href="../../../../org/codehaus/jackson/type/JavaType.html" title="class in org.codehaus.jackson.type">JavaType</a> _rootType</pre> 459<div class="block">Specified root serialization type to use; can be same 460 as runtime type, but usually one of its super types</div> 461</li> 462</ul> 463<a name="_prettyPrinter"> 464<!-- --> 465</a> 466<ul class="blockList"> 467<li class="blockList"> 468<h4>_prettyPrinter</h4> 469<pre>protected final <a href="../../../../org/codehaus/jackson/PrettyPrinter.html" title="interface in org.codehaus.jackson">PrettyPrinter</a> _prettyPrinter</pre> 470<div class="block">To allow for dynamic enabling/disabling of pretty printing, 471 pretty printer can be optionally configured for writer 472 as well</div> 473</li> 474</ul> 475<a name="_schema"> 476<!-- --> 477</a> 478<ul class="blockListLast"> 479<li class="blockList"> 480<h4>_schema</h4> 481<pre>protected final <a href="../../../../org/codehaus/jackson/FormatSchema.html" title="interface in org.codehaus.jackson">FormatSchema</a> _schema</pre> 482<div class="block">When using data format that uses a schema, schema is passed 483 to generator.</div> 484<dl><dt><span class="strong">Since:</span></dt> 485 <dd>1.8</dd></dl> 486</li> 487</ul> 488</li> 489</ul> 490<!-- ========= CONSTRUCTOR DETAIL ======== --> 491<ul class="blockList"> 492<li class="blockList"><a name="constructor_detail"> 493<!-- --> 494</a> 495<h3>Constructor Detail</h3> 496<a name="ObjectWriter(org.codehaus.jackson.map.ObjectMapper, org.codehaus.jackson.map.SerializationConfig, org.codehaus.jackson.type.JavaType, org.codehaus.jackson.PrettyPrinter)"> 497<!-- --> 498</a> 499<ul class="blockList"> 500<li class="blockList"> 501<h4>ObjectWriter</h4> 502<pre>protected ObjectWriter(<a href="../../../../org/codehaus/jackson/map/ObjectMapper.html" title="class in org.codehaus.jackson.map">ObjectMapper</a> mapper, 503 <a href="../../../../org/codehaus/jackson/map/SerializationConfig.html" title="class in org.codehaus.jackson.map">SerializationConfig</a> config, 504 <a href="../../../../org/codehaus/jackson/type/JavaType.html" title="class in org.codehaus.jackson.type">JavaType</a> rootType, 505 <a href="../../../../org/codehaus/jackson/PrettyPrinter.html" title="interface in org.codehaus.jackson">PrettyPrinter</a> pp)</pre> 506<div class="block">Constructor used by <a href="../../../../org/codehaus/jackson/map/ObjectMapper.html" title="class in org.codehaus.jackson.map"><code>ObjectMapper</code></a> for initial instantiation</div> 507</li> 508</ul> 509<a name="ObjectWriter(org.codehaus.jackson.map.ObjectMapper, org.codehaus.jackson.map.SerializationConfig)"> 510<!-- --> 511</a> 512<ul class="blockList"> 513<li class="blockList"> 514<h4>ObjectWriter</h4> 515<pre>protected ObjectWriter(<a href="../../../../org/codehaus/jackson/map/ObjectMapper.html" title="class in org.codehaus.jackson.map">ObjectMapper</a> mapper, 516 <a href="../../../../org/codehaus/jackson/map/SerializationConfig.html" title="class in org.codehaus.jackson.map">SerializationConfig</a> config)</pre> 517<div class="block">Alternative constructor for initial instantiation.</div> 518<dl><dt><span class="strong">Since:</span></dt> 519 <dd>1.7</dd></dl> 520</li> 521</ul> 522<a name="ObjectWriter(org.codehaus.jackson.map.ObjectMapper, org.codehaus.jackson.map.SerializationConfig, org.codehaus.jackson.FormatSchema)"> 523<!-- --> 524</a> 525<ul class="blockList"> 526<li class="blockList"> 527<h4>ObjectWriter</h4> 528<pre>protected ObjectWriter(<a href="../../../../org/codehaus/jackson/map/ObjectMapper.html" title="class in org.codehaus.jackson.map">ObjectMapper</a> mapper, 529 <a href="../../../../org/codehaus/jackson/map/SerializationConfig.html" title="class in org.codehaus.jackson.map">SerializationConfig</a> config, 530 <a href="../../../../org/codehaus/jackson/FormatSchema.html" title="interface in org.codehaus.jackson">FormatSchema</a> s)</pre> 531<div class="block">Alternative constructor for initial instantiation.</div> 532<dl><dt><span class="strong">Since:</span></dt> 533 <dd>1.7</dd></dl> 534</li> 535</ul> 536<a name="ObjectWriter(org.codehaus.jackson.map.ObjectWriter, org.codehaus.jackson.map.SerializationConfig, org.codehaus.jackson.type.JavaType, org.codehaus.jackson.PrettyPrinter, org.codehaus.jackson.FormatSchema)"> 537<!-- --> 538</a> 539<ul class="blockList"> 540<li class="blockList"> 541<h4>ObjectWriter</h4> 542<pre>protected ObjectWriter(<a href="../../../../org/codehaus/jackson/map/ObjectWriter.html" title="class in org.codehaus.jackson.map">ObjectWriter</a> base, 543 <a href="../../../../org/codehaus/jackson/map/SerializationConfig.html" title="class in org.codehaus.jackson.map">SerializationConfig</a> config, 544 <a href="../../../../org/codehaus/jackson/type/JavaType.html" title="class in org.codehaus.jackson.type">JavaType</a> rootType, 545 <a href="../../../../org/codehaus/jackson/PrettyPrinter.html" title="interface in org.codehaus.jackson">PrettyPrinter</a> pp, 546 <a href="../../../../org/codehaus/jackson/FormatSchema.html" title="interface in org.codehaus.jackson">FormatSchema</a> s)</pre> 547<div class="block">Copy constructor used for building variations.</div> 548</li> 549</ul> 550<a name="ObjectWriter(org.codehaus.jackson.map.ObjectWriter, org.codehaus.jackson.map.SerializationConfig)"> 551<!-- --> 552</a> 553<ul class="blockListLast"> 554<li class="blockList"> 555<h4>ObjectWriter</h4> 556<pre>protected ObjectWriter(<a href="../../../../org/codehaus/jackson/map/ObjectWriter.html" title="class in org.codehaus.jackson.map">ObjectWriter</a> base, 557 <a href="../../../../org/codehaus/jackson/map/SerializationConfig.html" title="class in org.codehaus.jackson.map">SerializationConfig</a> config)</pre> 558<div class="block">Copy constructor used for building variations.</div> 559<dl><dt><span class="strong">Since:</span></dt> 560 <dd>1.7</dd></dl> 561</li> 562</ul> 563</li> 564</ul> 565<!-- ============ METHOD DETAIL ========== --> 566<ul class="blockList"> 567<li class="blockList"><a name="method_detail"> 568<!-- --> 569</a> 570<h3>Method Detail</h3> 571<a name="version()"> 572<!-- --> 573</a> 574<ul class="blockList"> 575<li class="blockList"> 576<h4>version</h4> 577<pre>public <a href="../../../../org/codehaus/jackson/Version.html" title="class in org.codehaus.jackson">Version</a> version()</pre> 578<div class="block">Method that will return version information stored in and read from jar 579 that contains this class.</div> 580<dl> 581<dt><strong>Specified by:</strong></dt> 582<dd><code><a href="../../../../org/codehaus/jackson/Versioned.html#version()">version</a></code> in interface <code><a href="../../../../org/codehaus/jackson/Versioned.html" title="interface in org.codehaus.jackson">Versioned</a></code></dd> 583<dt><span class="strong">Since:</span></dt> 584 <dd>1.6</dd></dl> 585</li> 586</ul> 587<a name="withView(java.lang.Class)"> 588<!-- --> 589</a> 590<ul class="blockList"> 591<li class="blockList"> 592<h4>withView</h4> 593<pre>public <a href="../../../../org/codehaus/jackson/map/ObjectWriter.html" title="class in org.codehaus.jackson.map">ObjectWriter</a> withView(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> view)</pre> 594<div class="block">Method that will construct a new instance that uses specified 595 serialization view for serialization (with null basically disables 596 view processing)</div> 597</li> 598</ul> 599<a name="withType(org.codehaus.jackson.type.JavaType)"> 600<!-- --> 601</a> 602<ul class="blockList"> 603<li class="blockList"> 604<h4>withType</h4> 605<pre>public <a href="../../../../org/codehaus/jackson/map/ObjectWriter.html" title="class in org.codehaus.jackson.map">ObjectWriter</a> withType(<a href="../../../../org/codehaus/jackson/type/JavaType.html" title="class in org.codehaus.jackson.type">JavaType</a> rootType)</pre> 606<div class="block">Method that will construct a new instance that uses specific type 607 as the root type for serialization, instead of runtime dynamic 608 type of the root object itself.</div> 609</li> 610</ul> 611<a name="withType(java.lang.Class)"> 612<!-- --> 613</a> 614<ul class="blockList"> 615<li class="blockList"> 616<h4>withType</h4> 617<pre>public <a href="../../../../org/codehaus/jackson/map/ObjectWriter.html" title="class in org.codehaus.jackson.map">ObjectWriter</a> withType(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> rootType)</pre> 618<div class="block">Method that will construct a new instance that uses specific type 619 as the root type for serialization, instead of runtime dynamic 620 type of the root object itself.</div> 621</li> 622</ul> 623<a name="withType(org.codehaus.jackson.type.TypeReference)"> 624<!-- --> 625</a> 626<ul class="blockList"> 627<li class="blockList"> 628<h4>withType</h4> 629<pre>public <a href="../../../../org/codehaus/jackson/map/ObjectWriter.html" title="class in org.codehaus.jackson.map">ObjectWriter</a> withType(<a href="../../../../org/codehaus/jackson/type/TypeReference.html" title="class in org.codehaus.jackson.type">TypeReference</a><?> rootType)</pre> 630<dl><dt><span class="strong">Since:</span></dt> 631 <dd>1.7</dd></dl> 632</li> 633</ul> 634<a name="withPrettyPrinter(org.codehaus.jackson.PrettyPrinter)"> 635<!-- --> 636</a> 637<ul class="blockList"> 638<li class="blockList"> 639<h4>withPrettyPrinter</h4> 640<pre>public <a href="../../../../org/codehaus/jackson/map/ObjectWriter.html" title="class in org.codehaus.jackson.map">ObjectWriter</a> withPrettyPrinter(<a href="../../../../org/codehaus/jackson/PrettyPrinter.html" title="interface in org.codehaus.jackson">PrettyPrinter</a> pp)</pre> 641<div class="block">Method that will construct a new instance that will use specified pretty 642 printer (or, if null, will not do any pretty-printing)</div> 643<dl><dt><span class="strong">Since:</span></dt> 644 <dd>1.6</dd></dl> 645</li> 646</ul> 647<a name="withDefaultPrettyPrinter()"> 648<!-- --> 649</a> 650<ul class="blockList"> 651<li class="blockList"> 652<h4>withDefaultPrettyPrinter</h4> 653<pre>public <a href="../../../../org/codehaus/jackson/map/ObjectWriter.html" title="class in org.codehaus.jackson.map">ObjectWriter</a> withDefaultPrettyPrinter()</pre> 654<div class="block">Method that will construct a new instance that will use the default 655 pretty printer for serialization.</div> 656<dl><dt><span class="strong">Since:</span></dt> 657 <dd>1.6</dd></dl> 658</li> 659</ul> 660<a name="withFilters(org.codehaus.jackson.map.ser.FilterProvider)"> 661<!-- --> 662</a> 663<ul class="blockList"> 664<li class="blockList"> 665<h4>withFilters</h4> 666<pre>public <a href="../../../../org/codehaus/jackson/map/ObjectWriter.html" title="class in org.codehaus.jackson.map">ObjectWriter</a> withFilters(<a href="../../../../org/codehaus/jackson/map/ser/FilterProvider.html" title="class in org.codehaus.jackson.map.ser">FilterProvider</a> filterProvider)</pre> 667<div class="block">Method that will construct a new instance that uses specified 668 provider for resolving filter instances by id.</div> 669<dl><dt><span class="strong">Since:</span></dt> 670 <dd>1.7</dd></dl> 671</li> 672</ul> 673<a name="withSchema(org.codehaus.jackson.FormatSchema)"> 674<!-- --> 675</a> 676<ul class="blockList"> 677<li class="blockList"> 678<h4>withSchema</h4> 679<pre>public <a href="../../../../org/codehaus/jackson/map/ObjectWriter.html" title="class in org.codehaus.jackson.map">ObjectWriter</a> withSchema(<a href="../../../../org/codehaus/jackson/FormatSchema.html" title="interface in org.codehaus.jackson">FormatSchema</a> schema)</pre> 680<dl><dt><span class="strong">Since:</span></dt> 681 <dd>1.8</dd></dl> 682</li> 683</ul> 684<a name="withDateFormat(java.text.DateFormat)"> 685<!-- --> 686</a> 687<ul class="blockList"> 688<li class="blockList"> 689<h4>withDateFormat</h4> 690<pre>public <a href="../../../../org/codehaus/jackson/map/ObjectWriter.html" title="class in org.codehaus.jackson.map">ObjectWriter</a> withDateFormat(<a href="http://docs.oracle.com/javase/6/docs/api/java/text/DateFormat.html?is-external=true" title="class or interface in java.text">DateFormat</a> df)</pre> 691<div class="block">Fluent factory method that will construct a new writer instance that will 692 use specified date format for serializing dates; or if null passed, one 693 that will serialize dates as numeric timestamps.</div> 694<dl><dt><span class="strong">Since:</span></dt> 695 <dd>1.9</dd></dl> 696</li> 697</ul> 698<a name="writeValue(org.codehaus.jackson.JsonGenerator, java.lang.Object)"> 699<!-- --> 700</a> 701<ul class="blockList"> 702<li class="blockList"> 703<h4>writeValue</h4> 704<pre>public void writeValue(<a href="../../../../org/codehaus/jackson/JsonGenerator.html" title="class in org.codehaus.jackson">JsonGenerator</a> jgen, 705 <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> value) 706 throws <a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a>, 707 <a href="../../../../org/codehaus/jackson/JsonGenerationException.html" title="class in org.codehaus.jackson">JsonGenerationException</a>, 708 <a href="../../../../org/codehaus/jackson/map/JsonMappingException.html" title="class in org.codehaus.jackson.map">JsonMappingException</a></pre> 709<div class="block">Method that can be used to serialize any Java value as 710 JSON output, using provided <a href="../../../../org/codehaus/jackson/JsonGenerator.html" title="class in org.codehaus.jackson"><code>JsonGenerator</code></a>.</div> 711<dl><dt><span class="strong">Throws:</span></dt> 712<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> 713<dd><code><a href="../../../../org/codehaus/jackson/JsonGenerationException.html" title="class in org.codehaus.jackson">JsonGenerationException</a></code></dd> 714<dd><code><a href="../../../../org/codehaus/jackson/map/JsonMappingException.html" title="class in org.codehaus.jackson.map">JsonMappingException</a></code></dd></dl> 715</li> 716</ul> 717<a name="writeValue(java.io.File, java.lang.Object)"> 718<!-- --> 719</a> 720<ul class="blockList"> 721<li class="blockList"> 722<h4>writeValue</h4> 723<pre>public void writeValue(<a href="http://docs.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> resultFile, 724 <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> value) 725 throws <a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a>, 726 <a href="../../../../org/codehaus/jackson/JsonGenerationException.html" title="class in org.codehaus.jackson">JsonGenerationException</a>, 727 <a href="../../../../org/codehaus/jackson/map/JsonMappingException.html" title="class in org.codehaus.jackson.map">JsonMappingException</a></pre> 728<div class="block">Method that can be used to serialize any Java value as 729 JSON output, written to File provided.</div> 730<dl><dt><span class="strong">Throws:</span></dt> 731<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> 732<dd><code><a href="../../../../org/codehaus/jackson/JsonGenerationException.html" title="class in org.codehaus.jackson">JsonGenerationException</a></code></dd> 733<dd><code><a href="../../../../org/codehaus/jackson/map/JsonMappingException.html" title="class in org.codehaus.jackson.map">JsonMappingException</a></code></dd></dl> 734</li> 735</ul> 736<a name="writeValue(java.io.OutputStream, java.lang.Object)"> 737<!-- --> 738</a> 739<ul class="blockList"> 740<li class="blockList"> 741<h4>writeValue</h4> 742<pre>public void writeValue(<a href="http://docs.oracle.com/javase/6/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> out, 743 <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> value) 744 throws <a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a>, 745 <a href="../../../../org/codehaus/jackson/JsonGenerationException.html" title="class in org.codehaus.jackson">JsonGenerationException</a>, 746 <a href="../../../../org/codehaus/jackson/map/JsonMappingException.html" title="class in org.codehaus.jackson.map">JsonMappingException</a></pre> 747<div class="block">Method that can be used to serialize any Java value as 748 JSON output, using output stream provided (using encoding 749 <a href="../../../../org/codehaus/jackson/JsonEncoding.html#UTF8"><code>JsonEncoding.UTF8</code></a>). 750<p> 751 Note: method does not close the underlying stream explicitly 752 here; however, <a href="../../../../org/codehaus/jackson/JsonFactory.html" title="class in org.codehaus.jackson"><code>JsonFactory</code></a> this mapper uses may choose 753 to close the stream depending on its settings (by default, 754 it will try to close it when <a href="../../../../org/codehaus/jackson/JsonGenerator.html" title="class in org.codehaus.jackson"><code>JsonGenerator</code></a> we construct 755 is closed).</div> 756<dl><dt><span class="strong">Throws:</span></dt> 757<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> 758<dd><code><a href="../../../../org/codehaus/jackson/JsonGenerationException.html" title="class in org.codehaus.jackson">JsonGenerationException</a></code></dd> 759<dd><code><a href="../../../../org/codehaus/jackson/map/JsonMappingException.html" title="class in org.codehaus.jackson.map">JsonMappingException</a></code></dd></dl> 760</li> 761</ul> 762<a name="writeValue(java.io.Writer, java.lang.Object)"> 763<!-- --> 764</a> 765<ul class="blockList"> 766<li class="blockList"> 767<h4>writeValue</h4> 768<pre>public void writeValue(<a href="http://docs.oracle.com/javase/6/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a> w, 769 <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> value) 770 throws <a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a>, 771 <a href="../../../../org/codehaus/jackson/JsonGenerationException.html" title="class in org.codehaus.jackson">JsonGenerationException</a>, 772 <a href="../../../../org/codehaus/jackson/map/JsonMappingException.html" title="class in org.codehaus.jackson.map">JsonMappingException</a></pre> 773<div class="block">Method that can be used to serialize any Java value as 774 JSON output, using Writer provided. 775<p> 776 Note: method does not close the underlying stream explicitly 777 here; however, <a href="../../../../org/codehaus/jackson/JsonFactory.html" title="class in org.codehaus.jackson"><code>JsonFactory</code></a> this mapper uses may choose 778 to close the stream depending on its settings (by default, 779 it will try to close it when <a href="../../../../org/codehaus/jackson/JsonGenerator.html" title="class in org.codehaus.jackson"><code>JsonGenerator</code></a> we construct 780 is closed).</div> 781<dl><dt><span class="strong">Throws:</span></dt> 782<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> 783<dd><code><a href="../../../../org/codehaus/jackson/JsonGenerationException.html" title="class in org.codehaus.jackson">JsonGenerationException</a></code></dd> 784<dd><code><a href="../../../../org/codehaus/jackson/map/JsonMappingException.html" title="class in org.codehaus.jackson.map">JsonMappingException</a></code></dd></dl> 785</li> 786</ul> 787<a name="writeValueAsString(java.lang.Object)"> 788<!-- --> 789</a> 790<ul class="blockList"> 791<li class="blockList"> 792<h4>writeValueAsString</h4> 793<pre>public <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> writeValueAsString(<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> value) 794 throws <a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a>, 795 <a href="../../../../org/codehaus/jackson/JsonGenerationException.html" title="class in org.codehaus.jackson">JsonGenerationException</a>, 796 <a href="../../../../org/codehaus/jackson/map/JsonMappingException.html" title="class in org.codehaus.jackson.map">JsonMappingException</a></pre> 797<div class="block">Method that can be used to serialize any Java value as 798 a String. Functionally equivalent to calling 799 <a href="../../../../org/codehaus/jackson/map/ObjectWriter.html#writeValue(java.io.Writer, java.lang.Object)"><code>writeValue(Writer,Object)</code></a> with <a href="http://docs.oracle.com/javase/6/docs/api/java/io/StringWriter.html?is-external=true" title="class or interface in java.io"><code>StringWriter</code></a> 800 and constructing String, but more efficient.</div> 801<dl><dt><span class="strong">Throws:</span></dt> 802<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> 803<dd><code><a href="../../../../org/codehaus/jackson/JsonGenerationException.html" title="class in org.codehaus.jackson">JsonGenerationException</a></code></dd> 804<dd><code><a href="../../../../org/codehaus/jackson/map/JsonMappingException.html" title="class in org.codehaus.jackson.map">JsonMappingException</a></code></dd></dl> 805</li> 806</ul> 807<a name="writeValueAsBytes(java.lang.Object)"> 808<!-- --> 809</a> 810<ul class="blockList"> 811<li class="blockList"> 812<h4>writeValueAsBytes</h4> 813<pre>public byte[] writeValueAsBytes(<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> value) 814 throws <a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a>, 815 <a href="../../../../org/codehaus/jackson/JsonGenerationException.html" title="class in org.codehaus.jackson">JsonGenerationException</a>, 816 <a href="../../../../org/codehaus/jackson/map/JsonMappingException.html" title="class in org.codehaus.jackson.map">JsonMappingException</a></pre> 817<div class="block">Method that can be used to serialize any Java value as 818 a byte array. Functionally equivalent to calling 819 <a href="../../../../org/codehaus/jackson/map/ObjectWriter.html#writeValue(java.io.Writer, java.lang.Object)"><code>writeValue(Writer,Object)</code></a> with <a href="http://docs.oracle.com/javase/6/docs/api/java/io/ByteArrayOutputStream.html?is-external=true" title="class or interface in java.io"><code>ByteArrayOutputStream</code></a> 820 and getting bytes, but more efficient. 821 Encoding used will be UTF-8.</div> 822<dl><dt><span class="strong">Throws:</span></dt> 823<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> 824<dd><code><a href="../../../../org/codehaus/jackson/JsonGenerationException.html" title="class in org.codehaus.jackson">JsonGenerationException</a></code></dd> 825<dd><code><a href="../../../../org/codehaus/jackson/map/JsonMappingException.html" title="class in org.codehaus.jackson.map">JsonMappingException</a></code></dd></dl> 826</li> 827</ul> 828<a name="canSerialize(java.lang.Class)"> 829<!-- --> 830</a> 831<ul class="blockList"> 832<li class="blockList"> 833<h4>canSerialize</h4> 834<pre>public boolean canSerialize(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> type)</pre> 835</li> 836</ul> 837<a name="_configAndWriteValue(org.codehaus.jackson.JsonGenerator, java.lang.Object)"> 838<!-- --> 839</a> 840<ul class="blockListLast"> 841<li class="blockList"> 842<h4>_configAndWriteValue</h4> 843<pre>protected final void _configAndWriteValue(<a href="../../../../org/codehaus/jackson/JsonGenerator.html" title="class in org.codehaus.jackson">JsonGenerator</a> jgen, 844 <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> value) 845 throws <a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a>, 846 <a href="../../../../org/codehaus/jackson/JsonGenerationException.html" title="class in org.codehaus.jackson">JsonGenerationException</a>, 847 <a href="../../../../org/codehaus/jackson/map/JsonMappingException.html" title="class in org.codehaus.jackson.map">JsonMappingException</a></pre> 848<div class="block">Method called to configure the generator as necessary and then 849 call write functionality</div> 850<dl><dt><span class="strong">Throws:</span></dt> 851<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> 852<dd><code><a href="../../../../org/codehaus/jackson/JsonGenerationException.html" title="class in org.codehaus.jackson">JsonGenerationException</a></code></dd> 853<dd><code><a href="../../../../org/codehaus/jackson/map/JsonMappingException.html" title="class in org.codehaus.jackson.map">JsonMappingException</a></code></dd></dl> 854</li> 855</ul> 856</li> 857</ul> 858</li> 859</ul> 860</div> 861</div> 862<!-- ========= END OF CLASS DATA ========= --> 863<!-- ======= START OF BOTTOM NAVBAR ====== --> 864<div class="bottomNav"><a name="navbar_bottom"> 865<!-- --> 866</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> 867<!-- --> 868</a> 869<ul class="navList" title="Navigation"> 870<li><a href="../../../../overview-summary.html">Overview</a></li> 871<li><a href="package-summary.html">Package</a></li> 872<li class="navBarCell1Rev">Class</li> 873<li><a href="class-use/ObjectWriter.html">Use</a></li> 874<li><a href="package-tree.html">Tree</a></li> 875<li><a href="../../../../deprecated-list.html">Deprecated</a></li> 876<li><a href="../../../../index-all.html">Index</a></li> 877<li><a href="../../../../help-doc.html">Help</a></li> 878</ul> 879</div> 880<div class="subNav"> 881<ul class="navList"> 882<li><a href="../../../../org/codehaus/jackson/map/ObjectReader.html" title="class in org.codehaus.jackson.map"><span class="strong">Prev Class</span></a></li> 883<li><a href="../../../../org/codehaus/jackson/map/PropertyNamingStrategy.html" title="class in org.codehaus.jackson.map"><span class="strong">Next Class</span></a></li> 884</ul> 885<ul class="navList"> 886<li><a href="../../../../index.html?org/codehaus/jackson/map/ObjectWriter.html" target="_top">Frames</a></li> 887<li><a href="ObjectWriter.html" target="_top">No Frames</a></li> 888</ul> 889<ul class="navList" id="allclasses_navbar_bottom"> 890<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> 891</ul> 892<div> 893<script type="text/javascript"><!-- 894 allClassesLink = document.getElementById("allclasses_navbar_bottom"); 895 if(window==top) { 896 allClassesLink.style.display = "block"; 897 } 898 else { 899 allClassesLink.style.display = "none"; 900 } 901 //--> 902</script> 903</div> 904<div> 905<ul class="subNavList"> 906<li>Summary: </li> 907<li>Nested | </li> 908<li><a href="#field_summary">Field</a> | </li> 909<li><a href="#constructor_summary">Constr</a> | </li> 910<li><a href="#method_summary">Method</a></li> 911</ul> 912<ul class="subNavList"> 913<li>Detail: </li> 914<li><a href="#field_detail">Field</a> | </li> 915<li><a href="#constructor_detail">Constr</a> | </li> 916<li><a href="#method_detail">Method</a></li> 917</ul> 918</div> 919<a name="skip-navbar_bottom"> 920<!-- --> 921</a></div> 922<!-- ======== END OF BOTTOM NAVBAR ======= --> 923</body> 924</html> 925