This file is indexed.

/usr/share/doc/libbcpg-java/api/org/bouncycastle/openpgp/PGPLiteralDataGenerator.html is in libbcpg-java-doc 1.59-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html>
<head>
<title>PGPLiteralDataGenerator (Bouncy Castle Library 1.59 API Specification)</title>
<meta name="date" content="2018-01-16">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
    try {
        if (location.href.indexOf('is-external=true') == -1) {
            parent.document.title="PGPLiteralDataGenerator (Bouncy Castle Library 1.59 API Specification)";
        }
    }
    catch(err) {
    }
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><b>Bouncy Castle Cryptography Library 1.59</b></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../org/bouncycastle/openpgp/PGPLiteralData.html" title="class in org.bouncycastle.openpgp"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../org/bouncycastle/openpgp/PGPMarker.html" title="class in org.bouncycastle.openpgp"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?org/bouncycastle/openpgp/PGPLiteralDataGenerator.html" target="_top">Frames</a></li>
<li><a href="PGPLiteralDataGenerator.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.bouncycastle.openpgp</div>
<h2 title="Class PGPLiteralDataGenerator" class="title">Class PGPLiteralDataGenerator</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.bouncycastle.openpgp.PGPLiteralDataGenerator</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="typeNameLabel">PGPLiteralDataGenerator</span>
extends java.lang.Object</pre>
<div class="block">Generator for producing literal data packets.
 <p>
 A PGPLiteralData is used by invoking one of the open functions to create an OutputStream that raw
 data can be supplied to for encoding:  </p>
 <ul>
 <li>If the length of the data to be written is known in advance, use
 <a href="../../../org/bouncycastle/openpgp/PGPLiteralDataGenerator.html#open-java.io.OutputStream-char-java.lang.String-long-java.util.Date-"><code>open(OutputStream, char, String, long, Date)</code></a> to create a packet containing a single
 literal data object.</li>
 <li>If the length of the data is unknown, use
 <a href="../../../org/bouncycastle/openpgp/PGPLiteralDataGenerator.html#open-java.io.OutputStream-char-java.lang.String-java.util.Date-byte:A-"><code>open(OutputStream, char, String, Date, byte[])</code></a> to create a packet consisting of a series
 of literal data objects (partials).</li>
 </ul>
 <p>
 A PGPLiteralDataGenerator is usually used to wrap the OutputStream
 <a href="../../../org/bouncycastle/openpgp/PGPEncryptedDataGenerator.html#open-java.io.OutputStream-byte:A-"><code>obtained</code></a> from a
 <a href="../../../org/bouncycastle/openpgp/PGPEncryptedDataGenerator.html" title="class in org.bouncycastle.openpgp"><code>PGPEncryptedDataGenerator</code></a> or a <a href="../../../org/bouncycastle/openpgp/PGPCompressedDataGenerator.html" title="class in org.bouncycastle.openpgp"><code>PGPCompressedDataGenerator</code></a>.
 </p><p>
 Once literal data has been written to the constructed OutputStream, writing of the object stream
 is completed by closing the OutputStream obtained from the <code>open()</code> method, or
 equivalently invoking <a href="../../../org/bouncycastle/openpgp/PGPLiteralDataGenerator.html#close--"><code>close()</code></a> on this generator.
 </p></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!--   -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static char</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/bouncycastle/openpgp/PGPLiteralDataGenerator.html#BINARY">BINARY</a></span></code>
<div class="block">Format tag for binary literal data</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/bouncycastle/openpgp/PGPLiteralDataGenerator.html#CONSOLE">CONSOLE</a></span></code>
<div class="block">The special name indicating a "for your eyes only" packet.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.util.Date</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/bouncycastle/openpgp/PGPLiteralDataGenerator.html#NOW">NOW</a></span></code>
<div class="block">The special time for a modification time of "now" or
 the present time.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static char</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/bouncycastle/openpgp/PGPLiteralDataGenerator.html#TEXT">TEXT</a></span></code>
<div class="block">Format tag for textual literal data</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static char</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/bouncycastle/openpgp/PGPLiteralDataGenerator.html#UTF8">UTF8</a></span></code>
<div class="block">Format tag for UTF-8 encoded textual literal data</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../org/bouncycastle/openpgp/PGPLiteralDataGenerator.html#PGPLiteralDataGenerator--">PGPLiteralDataGenerator</a></span>()</code>
<div class="block">Constructs a generator for literal data objects.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../org/bouncycastle/openpgp/PGPLiteralDataGenerator.html#PGPLiteralDataGenerator-boolean-">PGPLiteralDataGenerator</a></span>(boolean&nbsp;oldFormat)</code>
<div class="block">Constructs a generator for literal data objects, specifying to use new or old (PGP 2.6.x
 compatible) format.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<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="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/bouncycastle/openpgp/PGPLiteralDataGenerator.html#close--">close</a></span>()</code>
<div class="block">Close the literal data packet - this is equivalent to calling close on the stream
 returned by the open() method.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>java.io.OutputStream</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/bouncycastle/openpgp/PGPLiteralDataGenerator.html#open-java.io.OutputStream-char-java.io.File-">open</a></span>(java.io.OutputStream&nbsp;out,
    char&nbsp;format,
    java.io.File&nbsp;file)</code>
<div class="block">Open a literal data packet for the passed in File object, returning an output stream for
 saving the file contents.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>java.io.OutputStream</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/bouncycastle/openpgp/PGPLiteralDataGenerator.html#open-java.io.OutputStream-char-java.lang.String-java.util.Date-byte:A-">open</a></span>(java.io.OutputStream&nbsp;out,
    char&nbsp;format,
    java.lang.String&nbsp;name,
    java.util.Date&nbsp;modificationTime,
    byte[]&nbsp;buffer)</code>
<div class="block">Open a literal data packet, returning a stream to store the data inside the packet as an
 indefinite-length stream.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>java.io.OutputStream</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/bouncycastle/openpgp/PGPLiteralDataGenerator.html#open-java.io.OutputStream-char-java.lang.String-long-java.util.Date-">open</a></span>(java.io.OutputStream&nbsp;out,
    char&nbsp;format,
    java.lang.String&nbsp;name,
    long&nbsp;length,
    java.util.Date&nbsp;modificationTime)</code>
<div class="block">Open a literal data packet, returning a stream to store the data inside the packet.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!--   -->
</a>
<h3>Field Detail</h3>
<a name="BINARY">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BINARY</h4>
<pre>public static final&nbsp;char BINARY</pre>
<div class="block">Format tag for binary literal data</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.bouncycastle.openpgp.PGPLiteralDataGenerator.BINARY">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="TEXT">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TEXT</h4>
<pre>public static final&nbsp;char TEXT</pre>
<div class="block">Format tag for textual literal data</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.bouncycastle.openpgp.PGPLiteralDataGenerator.TEXT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="UTF8">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>UTF8</h4>
<pre>public static final&nbsp;char UTF8</pre>
<div class="block">Format tag for UTF-8 encoded textual literal data</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.bouncycastle.openpgp.PGPLiteralDataGenerator.UTF8">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="CONSOLE">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>CONSOLE</h4>
<pre>public static final&nbsp;java.lang.String CONSOLE</pre>
<div class="block">The special name indicating a "for your eyes only" packet.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#org.bouncycastle.openpgp.PGPLiteralDataGenerator.CONSOLE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="NOW">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>NOW</h4>
<pre>public static final&nbsp;java.util.Date NOW</pre>
<div class="block">The special time for a modification time of "now" or
 the present time.</div>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a name="PGPLiteralDataGenerator--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PGPLiteralDataGenerator</h4>
<pre>public&nbsp;PGPLiteralDataGenerator()</pre>
<div class="block">Constructs a generator for literal data objects.</div>
</li>
</ul>
<a name="PGPLiteralDataGenerator-boolean-">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>PGPLiteralDataGenerator</h4>
<pre>public&nbsp;PGPLiteralDataGenerator(boolean&nbsp;oldFormat)</pre>
<div class="block">Constructs a generator for literal data objects, specifying to use new or old (PGP 2.6.x
 compatible) format.
 <p>
 This can be used for compatibility with PGP 2.6.x.
 </p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>oldFormat</code> - <code>true</code> to use PGP 2.6.x compatible format.</dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="open-java.io.OutputStream-char-java.lang.String-long-java.util.Date-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>open</h4>
<pre>public&nbsp;java.io.OutputStream&nbsp;open(java.io.OutputStream&nbsp;out,
                                 char&nbsp;format,
                                 java.lang.String&nbsp;name,
                                 long&nbsp;length,
                                 java.util.Date&nbsp;modificationTime)
                          throws java.io.IOException</pre>
<div class="block">Open a literal data packet, returning a stream to store the data inside the packet.
 <p>
 The stream created can be closed off by either calling close() on the stream or close() on
 the generator. Closing the returned stream does not close off the OutputStream parameter out.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>out</code> - the underlying output stream to write the literal data packet to.</dd>
<dd><code>format</code> - the format of the literal data that will be written to the output stream (one
            of <a href="../../../org/bouncycastle/openpgp/PGPLiteralDataGenerator.html#BINARY"><code>BINARY</code></a>, <a href="../../../org/bouncycastle/openpgp/PGPLiteralDataGenerator.html#TEXT"><code>TEXT</code></a> or <a href="../../../org/bouncycastle/openpgp/PGPLiteralDataGenerator.html#UTF8"><code>UTF8</code></a>).</dd>
<dd><code>name</code> - the name of the "file" to encode in the literal data object.</dd>
<dd><code>length</code> - the length of the data that will be written.</dd>
<dd><code>modificationTime</code> - the time of last modification we want stored.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
</dl>
</li>
</ul>
<a name="open-java.io.OutputStream-char-java.lang.String-java.util.Date-byte:A-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>open</h4>
<pre>public&nbsp;java.io.OutputStream&nbsp;open(java.io.OutputStream&nbsp;out,
                                 char&nbsp;format,
                                 java.lang.String&nbsp;name,
                                 java.util.Date&nbsp;modificationTime,
                                 byte[]&nbsp;buffer)
                          throws java.io.IOException</pre>
<div class="block">Open a literal data packet, returning a stream to store the data inside the packet as an
 indefinite-length stream. The stream is written out as a series of partial packets with a
 chunk size determined by the size of the passed in buffer.
 <p>
 The stream created can be closed off by either calling close() on the stream or close() on
 the generator. Closing the returned stream does not close off the OutputStream parameter out.

 <p>
 <b>Note</b>: if the buffer is not a power of 2 in length only the largest power of 2 bytes
 worth of the buffer will be used.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>out</code> - the underlying output stream to write the literal data packet to.</dd>
<dd><code>format</code> - the format of the literal data that will be written to the output stream (one
            of <a href="../../../org/bouncycastle/openpgp/PGPLiteralDataGenerator.html#BINARY"><code>BINARY</code></a>, <a href="../../../org/bouncycastle/openpgp/PGPLiteralDataGenerator.html#TEXT"><code>TEXT</code></a> or <a href="../../../org/bouncycastle/openpgp/PGPLiteralDataGenerator.html#UTF8"><code>UTF8</code></a>).</dd>
<dd><code>name</code> - the name of the "file" to encode in the literal data object.</dd>
<dd><code>modificationTime</code> - the time of last modification we want stored (will be stored to
            second level precision).</dd>
<dd><code>buffer</code> - a buffer to use to buffer and write partial packets. The returned stream takes
            ownership of the buffer.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the output stream to write data to.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code> - if an error occurs writing stream header information to the provider
             output stream.</dd>
<dd><code>java.lang.IllegalStateException</code> - if this generator already has an open OutputStream.</dd>
</dl>
</li>
</ul>
<a name="open-java.io.OutputStream-char-java.io.File-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>open</h4>
<pre>public&nbsp;java.io.OutputStream&nbsp;open(java.io.OutputStream&nbsp;out,
                                 char&nbsp;format,
                                 java.io.File&nbsp;file)
                          throws java.io.IOException</pre>
<div class="block">Open a literal data packet for the passed in File object, returning an output stream for
 saving the file contents.
 <p>
 This method configures the generator to store the file contents in a single literal data
 packet, taking the filename and modification time from the file, but does not store the
 actual file data.
 </p><p>
 The stream created can be closed off by either calling close() on the stream or close() on
 the generator. Closing the returned stream does not close off the OutputStream parameter out.
 </p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>out</code> - the underlying output stream to write the literal data packet to.</dd>
<dd><code>format</code> - the format of the literal data that will be written to the output stream (one
            of <a href="../../../org/bouncycastle/openpgp/PGPLiteralDataGenerator.html#BINARY"><code>BINARY</code></a>, <a href="../../../org/bouncycastle/openpgp/PGPLiteralDataGenerator.html#TEXT"><code>TEXT</code></a> or <a href="../../../org/bouncycastle/openpgp/PGPLiteralDataGenerator.html#UTF8"><code>UTF8</code></a>).</dd>
<dd><code>file</code> - the file to determine the length and filename from.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the output stream to write data to.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code> - if an error occurs writing stream header information to the provider
             output stream.</dd>
<dd><code>java.lang.IllegalStateException</code> - if this generator already has an open OutputStream.</dd>
</dl>
</li>
</ul>
<a name="close--">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>close</h4>
<pre>public&nbsp;void&nbsp;close()
           throws java.io.IOException</pre>
<div class="block">Close the literal data packet - this is equivalent to calling close on the stream
 returned by the open() method.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><b>Bouncy Castle Cryptography Library 1.59</b></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../org/bouncycastle/openpgp/PGPLiteralData.html" title="class in org.bouncycastle.openpgp"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../org/bouncycastle/openpgp/PGPMarker.html" title="class in org.bouncycastle.openpgp"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?org/bouncycastle/openpgp/PGPLiteralDataGenerator.html" target="_top">Frames</a></li>
<li><a href="PGPLiteralDataGenerator.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>