• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 -->
6<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
7<title>Writer (ZXing 3.5.1 API)</title>
8<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
9<script type="text/javascript" src="../../../script.js"></script>
10</head>
11<body>
12<script type="text/javascript"><!--
13    try {
14        if (location.href.indexOf('is-external=true') == -1) {
15            parent.document.title="Writer (ZXing 3.5.1 API)";
16        }
17    }
18    catch(err) {
19    }
20//-->
21var methods = {"i0":6,"i1":6};
22var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
23var altColor = "altColor";
24var rowColor = "rowColor";
25var tableTab = "tableTab";
26var activeTableTab = "activeTableTab";
27</script>
28<noscript>
29<div>JavaScript is disabled on your browser.</div>
30</noscript>
31<!-- ========= START OF TOP NAVBAR ======= -->
32<div class="topNav"><a name="navbar.top">
33<!--   -->
34</a>
35<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
36<a name="navbar.top.firstrow">
37<!--   -->
38</a>
39<ul class="navList" title="Navigation">
40<li><a href="../../../overview-summary.html">Overview</a></li>
41<li><a href="package-summary.html">Package</a></li>
42<li class="navBarCell1Rev">Class</li>
43<li><a href="class-use/Writer.html">Use</a></li>
44<li><a href="package-tree.html">Tree</a></li>
45<li><a href="../../../deprecated-list.html">Deprecated</a></li>
46<li><a href="../../../index-all.html">Index</a></li>
47<li><a href="../../../help-doc.html">Help</a></li>
48</ul>
49</div>
50<div class="subNav">
51<ul class="navList">
52<li><a href="../../../com/google/zxing/RGBLuminanceSource.html" title="class in com.google.zxing"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
53<li><a href="../../../com/google/zxing/WriterException.html" title="class in com.google.zxing"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
54</ul>
55<ul class="navList">
56<li><a href="../../../index.html?com/google/zxing/Writer.html" target="_top">Frames</a></li>
57<li><a href="Writer.html" target="_top">No&nbsp;Frames</a></li>
58</ul>
59<ul class="navList" id="allclasses_navbar_top">
60<li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
61</ul>
62<div>
63<script type="text/javascript"><!--
64  allClassesLink = document.getElementById("allclasses_navbar_top");
65  if(window==top) {
66    allClassesLink.style.display = "block";
67  }
68  else {
69    allClassesLink.style.display = "none";
70  }
71  //-->
72</script>
73</div>
74<div>
75<ul class="subNavList">
76<li>Summary:&nbsp;</li>
77<li>Nested&nbsp;|&nbsp;</li>
78<li>Field&nbsp;|&nbsp;</li>
79<li>Constr&nbsp;|&nbsp;</li>
80<li><a href="#method.summary">Method</a></li>
81</ul>
82<ul class="subNavList">
83<li>Detail:&nbsp;</li>
84<li>Field&nbsp;|&nbsp;</li>
85<li>Constr&nbsp;|&nbsp;</li>
86<li><a href="#method.detail">Method</a></li>
87</ul>
88</div>
89<a name="skip.navbar.top">
90<!--   -->
91</a></div>
92<!-- ========= END OF TOP NAVBAR ========= -->
93<!-- ======== START OF CLASS DATA ======== -->
94<div class="header">
95<div class="subTitle">com.google.zxing</div>
96<h2 title="Interface Writer" class="title">Interface Writer</h2>
97</div>
98<div class="contentContainer">
99<div class="description">
100<ul class="blockList">
101<li class="blockList">
102<dl>
103<dt>All Known Implementing Classes:</dt>
104<dd><a href="../../../com/google/zxing/aztec/AztecWriter.html" title="class in com.google.zxing.aztec">AztecWriter</a>, <a href="../../../com/google/zxing/oned/CodaBarWriter.html" title="class in com.google.zxing.oned">CodaBarWriter</a>, <a href="../../../com/google/zxing/oned/Code128Writer.html" title="class in com.google.zxing.oned">Code128Writer</a>, <a href="../../../com/google/zxing/oned/Code39Writer.html" title="class in com.google.zxing.oned">Code39Writer</a>, <a href="../../../com/google/zxing/oned/Code93Writer.html" title="class in com.google.zxing.oned">Code93Writer</a>, <a href="../../../com/google/zxing/datamatrix/DataMatrixWriter.html" title="class in com.google.zxing.datamatrix">DataMatrixWriter</a>, <a href="../../../com/google/zxing/oned/EAN13Writer.html" title="class in com.google.zxing.oned">EAN13Writer</a>, <a href="../../../com/google/zxing/oned/EAN8Writer.html" title="class in com.google.zxing.oned">EAN8Writer</a>, <a href="../../../com/google/zxing/oned/ITFWriter.html" title="class in com.google.zxing.oned">ITFWriter</a>, <a href="../../../com/google/zxing/MultiFormatWriter.html" title="class in com.google.zxing">MultiFormatWriter</a>, <a href="../../../com/google/zxing/oned/OneDimensionalCodeWriter.html" title="class in com.google.zxing.oned">OneDimensionalCodeWriter</a>, <a href="../../../com/google/zxing/pdf417/PDF417Writer.html" title="class in com.google.zxing.pdf417">PDF417Writer</a>, <a href="../../../com/google/zxing/qrcode/QRCodeWriter.html" title="class in com.google.zxing.qrcode">QRCodeWriter</a>, <a href="../../../com/google/zxing/oned/UPCAWriter.html" title="class in com.google.zxing.oned">UPCAWriter</a>, <a href="../../../com/google/zxing/oned/UPCEANWriter.html" title="class in com.google.zxing.oned">UPCEANWriter</a>, <a href="../../../com/google/zxing/oned/UPCEWriter.html" title="class in com.google.zxing.oned">UPCEWriter</a></dd>
105</dl>
106<hr>
107<br>
108<pre>public interface <span class="typeNameLabel">Writer</span></pre>
109<div class="block">The base class for all objects which encode/generate a barcode image.</div>
110<dl>
111<dt><span class="simpleTagLabel">Author:</span></dt>
112<dd>dswitkin@google.com (Daniel Switkin)</dd>
113</dl>
114</li>
115</ul>
116</div>
117<div class="summary">
118<ul class="blockList">
119<li class="blockList">
120<!-- ========== METHOD SUMMARY =========== -->
121<ul class="blockList">
122<li class="blockList"><a name="method.summary">
123<!--   -->
124</a>
125<h3>Method Summary</h3>
126<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
127<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
128<tr>
129<th class="colFirst" scope="col">Modifier and Type</th>
130<th class="colLast" scope="col">Method and Description</th>
131</tr>
132<tr id="i0" class="altColor">
133<td class="colFirst"><code><a href="../../../com/google/zxing/common/BitMatrix.html" title="class in com.google.zxing.common">BitMatrix</a></code></td>
134<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/google/zxing/Writer.html#encode-java.lang.String-com.google.zxing.BarcodeFormat-int-int-">encode</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;contents,
135      <a href="../../../com/google/zxing/BarcodeFormat.html" title="enum in com.google.zxing">BarcodeFormat</a>&nbsp;format,
136      int&nbsp;width,
137      int&nbsp;height)</code>
138<div class="block">Encode a barcode using the default settings.</div>
139</td>
140</tr>
141<tr id="i1" class="rowColor">
142<td class="colFirst"><code><a href="../../../com/google/zxing/common/BitMatrix.html" title="class in com.google.zxing.common">BitMatrix</a></code></td>
143<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/google/zxing/Writer.html#encode-java.lang.String-com.google.zxing.BarcodeFormat-int-int-java.util.Map-">encode</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;contents,
144      <a href="../../../com/google/zxing/BarcodeFormat.html" title="enum in com.google.zxing">BarcodeFormat</a>&nbsp;format,
145      int&nbsp;width,
146      int&nbsp;height,
147      <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="../../../com/google/zxing/EncodeHintType.html" title="enum in com.google.zxing">EncodeHintType</a>,?&gt;&nbsp;hints)</code>&nbsp;</td>
148</tr>
149</table>
150</li>
151</ul>
152</li>
153</ul>
154</div>
155<div class="details">
156<ul class="blockList">
157<li class="blockList">
158<!-- ============ METHOD DETAIL ========== -->
159<ul class="blockList">
160<li class="blockList"><a name="method.detail">
161<!--   -->
162</a>
163<h3>Method Detail</h3>
164<a name="encode-java.lang.String-com.google.zxing.BarcodeFormat-int-int-">
165<!--   -->
166</a>
167<ul class="blockList">
168<li class="blockList">
169<h4>encode</h4>
170<pre><a href="../../../com/google/zxing/common/BitMatrix.html" title="class in com.google.zxing.common">BitMatrix</a>&nbsp;encode(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;contents,
171                 <a href="../../../com/google/zxing/BarcodeFormat.html" title="enum in com.google.zxing">BarcodeFormat</a>&nbsp;format,
172                 int&nbsp;width,
173                 int&nbsp;height)
174          throws <a href="../../../com/google/zxing/WriterException.html" title="class in com.google.zxing">WriterException</a></pre>
175<div class="block">Encode a barcode using the default settings.</div>
176<dl>
177<dt><span class="paramLabel">Parameters:</span></dt>
178<dd><code>contents</code> - The contents to encode in the barcode</dd>
179<dd><code>format</code> - The barcode format to generate</dd>
180<dd><code>width</code> - The preferred width in pixels</dd>
181<dd><code>height</code> - The preferred height in pixels</dd>
182<dt><span class="returnLabel">Returns:</span></dt>
183<dd><a href="../../../com/google/zxing/common/BitMatrix.html" title="class in com.google.zxing.common"><code>BitMatrix</code></a> representing encoded barcode image</dd>
184<dt><span class="throwsLabel">Throws:</span></dt>
185<dd><code><a href="../../../com/google/zxing/WriterException.html" title="class in com.google.zxing">WriterException</a></code> - if contents cannot be encoded legally in a format</dd>
186</dl>
187</li>
188</ul>
189<a name="encode-java.lang.String-com.google.zxing.BarcodeFormat-int-int-java.util.Map-">
190<!--   -->
191</a>
192<ul class="blockListLast">
193<li class="blockList">
194<h4>encode</h4>
195<pre><a href="../../../com/google/zxing/common/BitMatrix.html" title="class in com.google.zxing.common">BitMatrix</a>&nbsp;encode(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;contents,
196                 <a href="../../../com/google/zxing/BarcodeFormat.html" title="enum in com.google.zxing">BarcodeFormat</a>&nbsp;format,
197                 int&nbsp;width,
198                 int&nbsp;height,
199                 <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="../../../com/google/zxing/EncodeHintType.html" title="enum in com.google.zxing">EncodeHintType</a>,?&gt;&nbsp;hints)
200          throws <a href="../../../com/google/zxing/WriterException.html" title="class in com.google.zxing">WriterException</a></pre>
201<dl>
202<dt><span class="paramLabel">Parameters:</span></dt>
203<dd><code>contents</code> - The contents to encode in the barcode</dd>
204<dd><code>format</code> - The barcode format to generate</dd>
205<dd><code>width</code> - The preferred width in pixels</dd>
206<dd><code>height</code> - The preferred height in pixels</dd>
207<dd><code>hints</code> - Additional parameters to supply to the encoder</dd>
208<dt><span class="returnLabel">Returns:</span></dt>
209<dd><a href="../../../com/google/zxing/common/BitMatrix.html" title="class in com.google.zxing.common"><code>BitMatrix</code></a> representing encoded barcode image</dd>
210<dt><span class="throwsLabel">Throws:</span></dt>
211<dd><code><a href="../../../com/google/zxing/WriterException.html" title="class in com.google.zxing">WriterException</a></code> - if contents cannot be encoded legally in a format</dd>
212</dl>
213</li>
214</ul>
215</li>
216</ul>
217</li>
218</ul>
219</div>
220</div>
221<!-- ========= END OF CLASS DATA ========= -->
222<!-- ======= START OF BOTTOM NAVBAR ====== -->
223<div class="bottomNav"><a name="navbar.bottom">
224<!--   -->
225</a>
226<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
227<a name="navbar.bottom.firstrow">
228<!--   -->
229</a>
230<ul class="navList" title="Navigation">
231<li><a href="../../../overview-summary.html">Overview</a></li>
232<li><a href="package-summary.html">Package</a></li>
233<li class="navBarCell1Rev">Class</li>
234<li><a href="class-use/Writer.html">Use</a></li>
235<li><a href="package-tree.html">Tree</a></li>
236<li><a href="../../../deprecated-list.html">Deprecated</a></li>
237<li><a href="../../../index-all.html">Index</a></li>
238<li><a href="../../../help-doc.html">Help</a></li>
239</ul>
240</div>
241<div class="subNav">
242<ul class="navList">
243<li><a href="../../../com/google/zxing/RGBLuminanceSource.html" title="class in com.google.zxing"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
244<li><a href="../../../com/google/zxing/WriterException.html" title="class in com.google.zxing"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
245</ul>
246<ul class="navList">
247<li><a href="../../../index.html?com/google/zxing/Writer.html" target="_top">Frames</a></li>
248<li><a href="Writer.html" target="_top">No&nbsp;Frames</a></li>
249</ul>
250<ul class="navList" id="allclasses_navbar_bottom">
251<li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
252</ul>
253<div>
254<script type="text/javascript"><!--
255  allClassesLink = document.getElementById("allclasses_navbar_bottom");
256  if(window==top) {
257    allClassesLink.style.display = "block";
258  }
259  else {
260    allClassesLink.style.display = "none";
261  }
262  //-->
263</script>
264</div>
265<div>
266<ul class="subNavList">
267<li>Summary:&nbsp;</li>
268<li>Nested&nbsp;|&nbsp;</li>
269<li>Field&nbsp;|&nbsp;</li>
270<li>Constr&nbsp;|&nbsp;</li>
271<li><a href="#method.summary">Method</a></li>
272</ul>
273<ul class="subNavList">
274<li>Detail:&nbsp;</li>
275<li>Field&nbsp;|&nbsp;</li>
276<li>Constr&nbsp;|&nbsp;</li>
277<li><a href="#method.detail">Method</a></li>
278</ul>
279</div>
280<a name="skip.navbar.bottom">
281<!--   -->
282</a></div>
283<!-- ======== END OF BOTTOM NAVBAR ======= -->
284<p class="legalCopy"><small>Copyright &#169; 2007&#x2013;2022. All rights reserved.</small></p>
285</body>
286</html>
287