source: release-kits/lirk3/resources/gs3-release-maker/ant/docs/manual/api/org/apache/tools/tar/TarBuffer.html@ 14982

Last change on this file since 14982 was 14982, checked in by oranfry, 16 years ago

initial import of LiRK3

File size: 21.3 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<!--NewPage-->
3<HTML>
4<HEAD>
5<!-- Generated by javadoc (build 1.4.2_13) on Mon Oct 01 14:33:35 NZST 2007 -->
6<TITLE>
7TarBuffer (Apache Ant API)
8</TITLE>
9
10<META NAME="keywords" CONTENT="org.apache.tools.tar.TarBuffer class">
11
12<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
13
14<SCRIPT type="text/javascript">
15function windowTitle()
16{
17 parent.document.title="TarBuffer (Apache Ant API)";
18}
19</SCRIPT>
20
21</HEAD>
22
23<BODY BGCOLOR="white" onload="windowTitle();">
24
25
26<!-- ========= START OF TOP NAVBAR ======= -->
27<A NAME="navbar_top"><!-- --></A>
28<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
29<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
30<TR>
31<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
32<A NAME="navbar_top_firstrow"><!-- --></A>
33<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
34 <TR ALIGN="center" VALIGN="top">
35 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
36 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
37 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
38 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
39 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
40 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
42 </TR>
43</TABLE>
44</TD>
45<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
46</EM>
47</TD>
48</TR>
49
50<TR>
51<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
52&nbsp;PREV CLASS&nbsp;
53&nbsp;<A HREF="../../../../org/apache/tools/tar/TarEntry.html" title="class in org.apache.tools.tar"><B>NEXT CLASS</B></A></FONT></TD>
54<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
55 <A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A> &nbsp;
56&nbsp;<A HREF="TarBuffer.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
57&nbsp;<SCRIPT type="text/javascript">
58 <!--
59 if(window==top) {
60 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
61 }
62 //-->
63</SCRIPT>
64<NOSCRIPT>
65 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
66</NOSCRIPT>
67
68</FONT></TD>
69</TR>
70<TR>
71<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
72 SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
73<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
74DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
75</TR>
76</TABLE>
77<A NAME="skip-navbar_top"></A>
78<!-- ========= END OF TOP NAVBAR ========= -->
79
80<HR>
81<!-- ======== START OF CLASS DATA ======== -->
82<H2>
83<FONT SIZE="-1">
84org.apache.tools.tar</FONT>
85<BR>
86Class TarBuffer</H2>
87<PRE>
88java.lang.Object
89 <IMG SRC="../../../../resources/inherit.gif" ALT="extended by"><B>org.apache.tools.tar.TarBuffer</B>
90</PRE>
91<HR>
92<DL>
93<DT>public class <B>TarBuffer</B><DT>extends java.lang.Object</DL>
94
95<P>
96The TarBuffer class implements the tar archive concept
97 of a buffered input stream. This concept goes back to the
98 days of blocked tape drives and special io devices. In the
99 Java universe, the only real function that this class
100 performs is to ensure that files have the correct "block"
101 size, or other tars will complain.
102 <p>
103 You should never have a need to access this class directly.
104 TarBuffers are created by Tar IO Streams.
105<P>
106
107<P>
108<HR>
109
110<P>
111<!-- ======== NESTED CLASS SUMMARY ======== -->
112
113
114<!-- =========== FIELD SUMMARY =========== -->
115
116<A NAME="field_summary"><!-- --></A>
117<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
118<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
119<TD COLSPAN=2><FONT SIZE="+2">
120<B>Field Summary</B></FONT></TD>
121</TR>
122<TR BGCOLOR="white" CLASS="TableRowColor">
123<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
124<CODE>static&nbsp;int</CODE></FONT></TD>
125<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarBuffer.html#DEFAULT_BLKSIZE">DEFAULT_BLKSIZE</A></B></CODE>
126
127<BR>
128&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
129</TR>
130<TR BGCOLOR="white" CLASS="TableRowColor">
131<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
132<CODE>static&nbsp;int</CODE></FONT></TD>
133<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarBuffer.html#DEFAULT_RCDSIZE">DEFAULT_RCDSIZE</A></B></CODE>
134
135<BR>
136&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
137</TR>
138</TABLE>
139&nbsp;
140<!-- ======== CONSTRUCTOR SUMMARY ======== -->
141
142<A NAME="constructor_summary"><!-- --></A>
143<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
144<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
145<TD COLSPAN=2><FONT SIZE="+2">
146<B>Constructor Summary</B></FONT></TD>
147</TR>
148<TR BGCOLOR="white" CLASS="TableRowColor">
149<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarBuffer.html#TarBuffer(java.io.InputStream)">TarBuffer</A></B>(java.io.InputStream&nbsp;inStream)</CODE>
150
151<BR>
152&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
153</TR>
154<TR BGCOLOR="white" CLASS="TableRowColor">
155<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarBuffer.html#TarBuffer(java.io.InputStream, int)">TarBuffer</A></B>(java.io.InputStream&nbsp;inStream,
156 int&nbsp;blockSize)</CODE>
157
158<BR>
159&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
160</TR>
161<TR BGCOLOR="white" CLASS="TableRowColor">
162<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarBuffer.html#TarBuffer(java.io.InputStream, int, int)">TarBuffer</A></B>(java.io.InputStream&nbsp;inStream,
163 int&nbsp;blockSize,
164 int&nbsp;recordSize)</CODE>
165
166<BR>
167&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
168</TR>
169<TR BGCOLOR="white" CLASS="TableRowColor">
170<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarBuffer.html#TarBuffer(java.io.OutputStream)">TarBuffer</A></B>(java.io.OutputStream&nbsp;outStream)</CODE>
171
172<BR>
173&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
174</TR>
175<TR BGCOLOR="white" CLASS="TableRowColor">
176<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarBuffer.html#TarBuffer(java.io.OutputStream, int)">TarBuffer</A></B>(java.io.OutputStream&nbsp;outStream,
177 int&nbsp;blockSize)</CODE>
178
179<BR>
180&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
181</TR>
182<TR BGCOLOR="white" CLASS="TableRowColor">
183<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarBuffer.html#TarBuffer(java.io.OutputStream, int, int)">TarBuffer</A></B>(java.io.OutputStream&nbsp;outStream,
184 int&nbsp;blockSize,
185 int&nbsp;recordSize)</CODE>
186
187<BR>
188&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
189</TR>
190</TABLE>
191&nbsp;
192<!-- ========== METHOD SUMMARY =========== -->
193
194<A NAME="method_summary"><!-- --></A>
195<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
196<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
197<TD COLSPAN=2><FONT SIZE="+2">
198<B>Method Summary</B></FONT></TD>
199</TR>
200<TR BGCOLOR="white" CLASS="TableRowColor">
201<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
202<CODE>&nbsp;void</CODE></FONT></TD>
203<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarBuffer.html#close()">close</A></B>()</CODE>
204
205<BR>
206&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Close the TarBuffer.</TD>
207</TR>
208<TR BGCOLOR="white" CLASS="TableRowColor">
209<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
210<CODE>&nbsp;int</CODE></FONT></TD>
211<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarBuffer.html#getBlockSize()">getBlockSize</A></B>()</CODE>
212
213<BR>
214&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the TAR Buffer's block size.</TD>
215</TR>
216<TR BGCOLOR="white" CLASS="TableRowColor">
217<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
218<CODE>&nbsp;int</CODE></FONT></TD>
219<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarBuffer.html#getCurrentBlockNum()">getCurrentBlockNum</A></B>()</CODE>
220
221<BR>
222&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the current block number, zero based.</TD>
223</TR>
224<TR BGCOLOR="white" CLASS="TableRowColor">
225<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
226<CODE>&nbsp;int</CODE></FONT></TD>
227<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarBuffer.html#getCurrentRecordNum()">getCurrentRecordNum</A></B>()</CODE>
228
229<BR>
230&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the current record number, within the current block, zero based.</TD>
231</TR>
232<TR BGCOLOR="white" CLASS="TableRowColor">
233<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
234<CODE>&nbsp;int</CODE></FONT></TD>
235<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarBuffer.html#getRecordSize()">getRecordSize</A></B>()</CODE>
236
237<BR>
238&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the TAR Buffer's record size.</TD>
239</TR>
240<TR BGCOLOR="white" CLASS="TableRowColor">
241<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
242<CODE>&nbsp;boolean</CODE></FONT></TD>
243<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarBuffer.html#isEOFRecord(byte[])">isEOFRecord</A></B>(byte[]&nbsp;record)</CODE>
244
245<BR>
246&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determine if an archive record indicate End of Archive.</TD>
247</TR>
248<TR BGCOLOR="white" CLASS="TableRowColor">
249<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
250<CODE>&nbsp;byte[]</CODE></FONT></TD>
251<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarBuffer.html#readRecord()">readRecord</A></B>()</CODE>
252
253<BR>
254&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Read a record from the input stream and return the data.</TD>
255</TR>
256<TR BGCOLOR="white" CLASS="TableRowColor">
257<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
258<CODE>&nbsp;void</CODE></FONT></TD>
259<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarBuffer.html#setDebug(boolean)">setDebug</A></B>(boolean&nbsp;debug)</CODE>
260
261<BR>
262&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the debugging flag for the buffer.</TD>
263</TR>
264<TR BGCOLOR="white" CLASS="TableRowColor">
265<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
266<CODE>&nbsp;void</CODE></FONT></TD>
267<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarBuffer.html#skipRecord()">skipRecord</A></B>()</CODE>
268
269<BR>
270&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Skip over a record on the input stream.</TD>
271</TR>
272<TR BGCOLOR="white" CLASS="TableRowColor">
273<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
274<CODE>&nbsp;void</CODE></FONT></TD>
275<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarBuffer.html#writeRecord(byte[])">writeRecord</A></B>(byte[]&nbsp;record)</CODE>
276
277<BR>
278&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Write an archive record to the archive.</TD>
279</TR>
280<TR BGCOLOR="white" CLASS="TableRowColor">
281<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
282<CODE>&nbsp;void</CODE></FONT></TD>
283<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarBuffer.html#writeRecord(byte[], int)">writeRecord</A></B>(byte[]&nbsp;buf,
284 int&nbsp;offset)</CODE>
285
286<BR>
287&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Write an archive record to the archive, where the record may be
288 inside of a larger array buffer.</TD>
289</TR>
290</TABLE>
291&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
292<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
293<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
294<TD><B>Methods inherited from class java.lang.Object</B></TD>
295</TR>
296<TR BGCOLOR="white" CLASS="TableRowColor">
297<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
298</TR>
299</TABLE>
300&nbsp;
301<P>
302
303<!-- ============ FIELD DETAIL =========== -->
304
305<A NAME="field_detail"><!-- --></A>
306<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
307<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
308<TD COLSPAN=1><FONT SIZE="+2">
309<B>Field Detail</B></FONT></TD>
310</TR>
311</TABLE>
312
313<A NAME="DEFAULT_RCDSIZE"><!-- --></A><H3>
314DEFAULT_RCDSIZE</H3>
315<PRE>
316public static final int <B>DEFAULT_RCDSIZE</B></PRE>
317<DL>
318<DL>
319<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.tools.tar.TarBuffer.DEFAULT_RCDSIZE">Constant Field Values</A></DL>
320</DL>
321<HR>
322
323<A NAME="DEFAULT_BLKSIZE"><!-- --></A><H3>
324DEFAULT_BLKSIZE</H3>
325<PRE>
326public static final int <B>DEFAULT_BLKSIZE</B></PRE>
327<DL>
328<DL>
329<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.tools.tar.TarBuffer.DEFAULT_BLKSIZE">Constant Field Values</A></DL>
330</DL>
331
332<!-- ========= CONSTRUCTOR DETAIL ======== -->
333
334<A NAME="constructor_detail"><!-- --></A>
335<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
336<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
337<TD COLSPAN=1><FONT SIZE="+2">
338<B>Constructor Detail</B></FONT></TD>
339</TR>
340</TABLE>
341
342<A NAME="TarBuffer(java.io.InputStream)"><!-- --></A><H3>
343TarBuffer</H3>
344<PRE>
345public <B>TarBuffer</B>(java.io.InputStream&nbsp;inStream)</PRE>
346<DL>
347</DL>
348<HR>
349
350<A NAME="TarBuffer(java.io.InputStream, int)"><!-- --></A><H3>
351TarBuffer</H3>
352<PRE>
353public <B>TarBuffer</B>(java.io.InputStream&nbsp;inStream,
354 int&nbsp;blockSize)</PRE>
355<DL>
356</DL>
357<HR>
358
359<A NAME="TarBuffer(java.io.InputStream, int, int)"><!-- --></A><H3>
360TarBuffer</H3>
361<PRE>
362public <B>TarBuffer</B>(java.io.InputStream&nbsp;inStream,
363 int&nbsp;blockSize,
364 int&nbsp;recordSize)</PRE>
365<DL>
366</DL>
367<HR>
368
369<A NAME="TarBuffer(java.io.OutputStream)"><!-- --></A><H3>
370TarBuffer</H3>
371<PRE>
372public <B>TarBuffer</B>(java.io.OutputStream&nbsp;outStream)</PRE>
373<DL>
374</DL>
375<HR>
376
377<A NAME="TarBuffer(java.io.OutputStream, int)"><!-- --></A><H3>
378TarBuffer</H3>
379<PRE>
380public <B>TarBuffer</B>(java.io.OutputStream&nbsp;outStream,
381 int&nbsp;blockSize)</PRE>
382<DL>
383</DL>
384<HR>
385
386<A NAME="TarBuffer(java.io.OutputStream, int, int)"><!-- --></A><H3>
387TarBuffer</H3>
388<PRE>
389public <B>TarBuffer</B>(java.io.OutputStream&nbsp;outStream,
390 int&nbsp;blockSize,
391 int&nbsp;recordSize)</PRE>
392<DL>
393</DL>
394
395<!-- ============ METHOD DETAIL ========== -->
396
397<A NAME="method_detail"><!-- --></A>
398<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
399<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
400<TD COLSPAN=1><FONT SIZE="+2">
401<B>Method Detail</B></FONT></TD>
402</TR>
403</TABLE>
404
405<A NAME="getBlockSize()"><!-- --></A><H3>
406getBlockSize</H3>
407<PRE>
408public int <B>getBlockSize</B>()</PRE>
409<DL>
410<DD>Get the TAR Buffer's block size. Blocks consist of multiple records.
411<P>
412<DD><DL>
413</DL>
414</DD>
415</DL>
416<HR>
417
418<A NAME="getRecordSize()"><!-- --></A><H3>
419getRecordSize</H3>
420<PRE>
421public int <B>getRecordSize</B>()</PRE>
422<DL>
423<DD>Get the TAR Buffer's record size.
424<P>
425<DD><DL>
426</DL>
427</DD>
428</DL>
429<HR>
430
431<A NAME="setDebug(boolean)"><!-- --></A><H3>
432setDebug</H3>
433<PRE>
434public void <B>setDebug</B>(boolean&nbsp;debug)</PRE>
435<DL>
436<DD>Set the debugging flag for the buffer.
437<P>
438<DD><DL>
439<DT><B>Parameters:</B><DD><CODE>debug</CODE> - If true, print debugging output.</DL>
440</DD>
441</DL>
442<HR>
443
444<A NAME="isEOFRecord(byte[])"><!-- --></A><H3>
445isEOFRecord</H3>
446<PRE>
447public boolean <B>isEOFRecord</B>(byte[]&nbsp;record)</PRE>
448<DL>
449<DD>Determine if an archive record indicate End of Archive. End of
450 archive is indicated by a record that consists entirely of null bytes.
451<P>
452<DD><DL>
453<DT><B>Parameters:</B><DD><CODE>record</CODE> - The record data to check.</DL>
454</DD>
455</DL>
456<HR>
457
458<A NAME="skipRecord()"><!-- --></A><H3>
459skipRecord</H3>
460<PRE>
461public void <B>skipRecord</B>()
462 throws java.io.IOException</PRE>
463<DL>
464<DD>Skip over a record on the input stream.
465<P>
466<DD><DL>
467
468<DT><B>Throws:</B>
469<DD><CODE>java.io.IOException</CODE></DL>
470</DD>
471</DL>
472<HR>
473
474<A NAME="readRecord()"><!-- --></A><H3>
475readRecord</H3>
476<PRE>
477public byte[] <B>readRecord</B>()
478 throws java.io.IOException</PRE>
479<DL>
480<DD>Read a record from the input stream and return the data.
481<P>
482<DD><DL>
483
484<DT><B>Returns:</B><DD>The record data.
485<DT><B>Throws:</B>
486<DD><CODE>java.io.IOException</CODE></DL>
487</DD>
488</DL>
489<HR>
490
491<A NAME="getCurrentBlockNum()"><!-- --></A><H3>
492getCurrentBlockNum</H3>
493<PRE>
494public int <B>getCurrentBlockNum</B>()</PRE>
495<DL>
496<DD>Get the current block number, zero based.
497<P>
498<DD><DL>
499
500<DT><B>Returns:</B><DD>The current zero based block number.</DL>
501</DD>
502</DL>
503<HR>
504
505<A NAME="getCurrentRecordNum()"><!-- --></A><H3>
506getCurrentRecordNum</H3>
507<PRE>
508public int <B>getCurrentRecordNum</B>()</PRE>
509<DL>
510<DD>Get the current record number, within the current block, zero based.
511 Thus, current offset = (currentBlockNum * recsPerBlk) + currentRecNum.
512<P>
513<DD><DL>
514
515<DT><B>Returns:</B><DD>The current zero based record number.</DL>
516</DD>
517</DL>
518<HR>
519
520<A NAME="writeRecord(byte[])"><!-- --></A><H3>
521writeRecord</H3>
522<PRE>
523public void <B>writeRecord</B>(byte[]&nbsp;record)
524 throws java.io.IOException</PRE>
525<DL>
526<DD>Write an archive record to the archive.
527<P>
528<DD><DL>
529<DT><B>Parameters:</B><DD><CODE>record</CODE> - The record data to write to the archive.
530<DT><B>Throws:</B>
531<DD><CODE>java.io.IOException</CODE></DL>
532</DD>
533</DL>
534<HR>
535
536<A NAME="writeRecord(byte[], int)"><!-- --></A><H3>
537writeRecord</H3>
538<PRE>
539public void <B>writeRecord</B>(byte[]&nbsp;buf,
540 int&nbsp;offset)
541 throws java.io.IOException</PRE>
542<DL>
543<DD>Write an archive record to the archive, where the record may be
544 inside of a larger array buffer. The buffer must be "offset plus
545 record size" long.
546<P>
547<DD><DL>
548<DT><B>Parameters:</B><DD><CODE>buf</CODE> - The buffer containing the record data to write.<DD><CODE>offset</CODE> - The offset of the record data within buf.
549<DT><B>Throws:</B>
550<DD><CODE>java.io.IOException</CODE></DL>
551</DD>
552</DL>
553<HR>
554
555<A NAME="close()"><!-- --></A><H3>
556close</H3>
557<PRE>
558public void <B>close</B>()
559 throws java.io.IOException</PRE>
560<DL>
561<DD>Close the TarBuffer. If this is an output buffer, also flush the
562 current block before closing.
563<P>
564<DD><DL>
565
566<DT><B>Throws:</B>
567<DD><CODE>java.io.IOException</CODE></DL>
568</DD>
569</DL>
570<!-- ========= END OF CLASS DATA ========= -->
571<HR>
572
573
574<!-- ======= START OF BOTTOM NAVBAR ====== -->
575<A NAME="navbar_bottom"><!-- --></A>
576<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
577<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
578<TR>
579<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
580<A NAME="navbar_bottom_firstrow"><!-- --></A>
581<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
582 <TR ALIGN="center" VALIGN="top">
583 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
584 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
585 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
586 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
587 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
588 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
589 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
590 </TR>
591</TABLE>
592</TD>
593<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
594</EM>
595</TD>
596</TR>
597
598<TR>
599<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
600&nbsp;PREV CLASS&nbsp;
601&nbsp;<A HREF="../../../../org/apache/tools/tar/TarEntry.html" title="class in org.apache.tools.tar"><B>NEXT CLASS</B></A></FONT></TD>
602<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
603 <A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A> &nbsp;
604&nbsp;<A HREF="TarBuffer.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
605&nbsp;<SCRIPT type="text/javascript">
606 <!--
607 if(window==top) {
608 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
609 }
610 //-->
611</SCRIPT>
612<NOSCRIPT>
613 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
614</NOSCRIPT>
615
616</FONT></TD>
617</TR>
618<TR>
619<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
620 SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
621<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
622DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
623</TR>
624</TABLE>
625<A NAME="skip-navbar_bottom"></A>
626<!-- ======== END OF BOTTOM NAVBAR ======= -->
627
628<HR>
629Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.
630</BODY>
631</HTML>
Note: See TracBrowser for help on using the repository browser.