source: proiecte/HadoopJUnit/hadoop-0.20.1/docs/api/org/apache/hadoop/io/compress/Decompressor.html @ 120

Last change on this file since 120 was 120, checked in by (none), 14 years ago

Added the mail files for the Hadoop JUNit Project

  • Property svn:executable set to *
File size: 15.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.6.0_07) on Tue Sep 01 20:56:53 UTC 2009 -->
6<TITLE>
7Decompressor (Hadoop 0.20.1 API)
8</TITLE>
9
10<META NAME="date" CONTENT="2009-09-01">
11
12<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
13
14<SCRIPT type="text/javascript">
15function windowTitle()
16{
17    if (location.href.indexOf('is-external=true') == -1) {
18        parent.document.title="Decompressor (Hadoop 0.20.1 API)";
19    }
20}
21</SCRIPT>
22<NOSCRIPT>
23</NOSCRIPT>
24
25</HEAD>
26
27<BODY BGCOLOR="white" onload="windowTitle();">
28<HR>
29
30
31<!-- ========= START OF TOP NAVBAR ======= -->
32<A NAME="navbar_top"><!-- --></A>
33<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
34<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
35<TR>
36<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
37<A NAME="navbar_top_firstrow"><!-- --></A>
38<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
39  <TR ALIGN="center" VALIGN="top">
40  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
41  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
42  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
43  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Decompressor.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
44  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
45  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
46  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
47  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
48  </TR>
49</TABLE>
50</TD>
51<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
52</EM>
53</TD>
54</TR>
55
56<TR>
57<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
58&nbsp;<A HREF="../../../../../org/apache/hadoop/io/compress/CompressorStream.html" title="class in org.apache.hadoop.io.compress"><B>PREV CLASS</B></A>&nbsp;
59&nbsp;<A HREF="../../../../../org/apache/hadoop/io/compress/DecompressorStream.html" title="class in org.apache.hadoop.io.compress"><B>NEXT CLASS</B></A></FONT></TD>
60<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
61  <A HREF="../../../../../index.html?org/apache/hadoop/io/compress/Decompressor.html" target="_top"><B>FRAMES</B></A>  &nbsp;
62&nbsp;<A HREF="Decompressor.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
63&nbsp;<SCRIPT type="text/javascript">
64  <!--
65  if(window==top) {
66    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
67  }
68  //-->
69</SCRIPT>
70<NOSCRIPT>
71  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
72</NOSCRIPT>
73
74
75</FONT></TD>
76</TR>
77<TR>
78<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
79  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
80<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
81DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
82</TR>
83</TABLE>
84<A NAME="skip-navbar_top"></A>
85<!-- ========= END OF TOP NAVBAR ========= -->
86
87<HR>
88<!-- ======== START OF CLASS DATA ======== -->
89<H2>
90<FONT SIZE="-1">
91org.apache.hadoop.io.compress</FONT>
92<BR>
93Interface Decompressor</H2>
94<DL>
95<DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../../../org/apache/hadoop/io/compress/zlib/BuiltInZlibInflater.html" title="class in org.apache.hadoop.io.compress.zlib">BuiltInZlibInflater</A>, <A HREF="../../../../../org/apache/hadoop/io/compress/bzip2/BZip2DummyDecompressor.html" title="class in org.apache.hadoop.io.compress.bzip2">BZip2DummyDecompressor</A>, <A HREF="../../../../../org/apache/hadoop/io/compress/zlib/ZlibDecompressor.html" title="class in org.apache.hadoop.io.compress.zlib">ZlibDecompressor</A></DD>
96</DL>
97<HR>
98<DL>
99<DT><PRE>public interface <B>Decompressor</B></DL>
100</PRE>
101
102<P>
103Specification of a stream-based 'de-compressor' which can be 
104 plugged into a <A HREF="../../../../../org/apache/hadoop/io/compress/CompressionInputStream.html" title="class in org.apache.hadoop.io.compress"><CODE>CompressionInputStream</CODE></A> to compress data.
105 This is modelled after <A HREF="http://java.sun.com/javase/6/docs/api/java/util/zip/Inflater.html?is-external=true" title="class or interface in java.util.zip"><CODE>Inflater</CODE></A>
106<P>
107
108<P>
109<HR>
110
111<P>
112
113<!-- ========== METHOD SUMMARY =========== -->
114
115<A NAME="method_summary"><!-- --></A>
116<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
117<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
118<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
119<B>Method Summary</B></FONT></TH>
120</TR>
121<TR BGCOLOR="white" CLASS="TableRowColor">
122<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
123<CODE>&nbsp;int</CODE></FONT></TD>
124<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/io/compress/Decompressor.html#decompress(byte[], int, int)">decompress</A></B>(byte[]&nbsp;b,
125           int&nbsp;off,
126           int&nbsp;len)</CODE>
127
128<BR>
129&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fills specified buffer with uncompressed data.</TD>
130</TR>
131<TR BGCOLOR="white" CLASS="TableRowColor">
132<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
133<CODE>&nbsp;void</CODE></FONT></TD>
134<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/io/compress/Decompressor.html#end()">end</A></B>()</CODE>
135
136<BR>
137&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Closes the decompressor and discards any unprocessed input.</TD>
138</TR>
139<TR BGCOLOR="white" CLASS="TableRowColor">
140<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
141<CODE>&nbsp;boolean</CODE></FONT></TD>
142<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/io/compress/Decompressor.html#finished()">finished</A></B>()</CODE>
143
144<BR>
145&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if the end of the compressed
146 data output stream has been reached.</TD>
147</TR>
148<TR BGCOLOR="white" CLASS="TableRowColor">
149<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
150<CODE>&nbsp;boolean</CODE></FONT></TD>
151<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/io/compress/Decompressor.html#needsDictionary()">needsDictionary</A></B>()</CODE>
152
153<BR>
154&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <code>true</code> if a preset dictionary is needed for decompression.</TD>
155</TR>
156<TR BGCOLOR="white" CLASS="TableRowColor">
157<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
158<CODE>&nbsp;boolean</CODE></FONT></TD>
159<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/io/compress/Decompressor.html#needsInput()">needsInput</A></B>()</CODE>
160
161<BR>
162&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if the input data buffer is empty and
163 #setInput() should be called to provide more input.</TD>
164</TR>
165<TR BGCOLOR="white" CLASS="TableRowColor">
166<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
167<CODE>&nbsp;void</CODE></FONT></TD>
168<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/io/compress/Decompressor.html#reset()">reset</A></B>()</CODE>
169
170<BR>
171&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Resets decompressor so that a new set of input data can be processed.</TD>
172</TR>
173<TR BGCOLOR="white" CLASS="TableRowColor">
174<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
175<CODE>&nbsp;void</CODE></FONT></TD>
176<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/io/compress/Decompressor.html#setDictionary(byte[], int, int)">setDictionary</A></B>(byte[]&nbsp;b,
177              int&nbsp;off,
178              int&nbsp;len)</CODE>
179
180<BR>
181&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets preset dictionary for compression.</TD>
182</TR>
183<TR BGCOLOR="white" CLASS="TableRowColor">
184<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
185<CODE>&nbsp;void</CODE></FONT></TD>
186<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/io/compress/Decompressor.html#setInput(byte[], int, int)">setInput</A></B>(byte[]&nbsp;b,
187         int&nbsp;off,
188         int&nbsp;len)</CODE>
189
190<BR>
191&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets input data for decompression.</TD>
192</TR>
193</TABLE>
194&nbsp;
195<P>
196
197<!-- ============ METHOD DETAIL ========== -->
198
199<A NAME="method_detail"><!-- --></A>
200<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
201<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
202<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
203<B>Method Detail</B></FONT></TH>
204</TR>
205</TABLE>
206
207<A NAME="setInput(byte[], int, int)"><!-- --></A><H3>
208setInput</H3>
209<PRE>
210void <B>setInput</B>(byte[]&nbsp;b,
211              int&nbsp;off,
212              int&nbsp;len)</PRE>
213<DL>
214<DD>Sets input data for decompression.
215 This should be called whenever #needsInput() returns
216 <code>true</code> indicating that more input data is required.
217<P>
218<DD><DL>
219<DT><B>Parameters:</B><DD><CODE>b</CODE> - Input data<DD><CODE>off</CODE> - Start offset<DD><CODE>len</CODE> - Length</DL>
220</DD>
221</DL>
222<HR>
223
224<A NAME="needsInput()"><!-- --></A><H3>
225needsInput</H3>
226<PRE>
227boolean <B>needsInput</B>()</PRE>
228<DL>
229<DD>Returns true if the input data buffer is empty and
230 #setInput() should be called to provide more input.
231<P>
232<DD><DL>
233
234<DT><B>Returns:</B><DD><code>true</code> if the input data buffer is empty and
235 #setInput() should be called in order to provide more input.</DL>
236</DD>
237</DL>
238<HR>
239
240<A NAME="setDictionary(byte[], int, int)"><!-- --></A><H3>
241setDictionary</H3>
242<PRE>
243void <B>setDictionary</B>(byte[]&nbsp;b,
244                   int&nbsp;off,
245                   int&nbsp;len)</PRE>
246<DL>
247<DD>Sets preset dictionary for compression. A preset dictionary
248 is used when the history buffer can be predetermined.
249<P>
250<DD><DL>
251<DT><B>Parameters:</B><DD><CODE>b</CODE> - Dictionary data bytes<DD><CODE>off</CODE> - Start offset<DD><CODE>len</CODE> - Length</DL>
252</DD>
253</DL>
254<HR>
255
256<A NAME="needsDictionary()"><!-- --></A><H3>
257needsDictionary</H3>
258<PRE>
259boolean <B>needsDictionary</B>()</PRE>
260<DL>
261<DD>Returns <code>true</code> if a preset dictionary is needed for decompression.
262<P>
263<DD><DL>
264
265<DT><B>Returns:</B><DD><code>true</code> if a preset dictionary is needed for decompression</DL>
266</DD>
267</DL>
268<HR>
269
270<A NAME="finished()"><!-- --></A><H3>
271finished</H3>
272<PRE>
273boolean <B>finished</B>()</PRE>
274<DL>
275<DD>Returns true if the end of the compressed
276 data output stream has been reached.
277<P>
278<DD><DL>
279
280<DT><B>Returns:</B><DD><code>true</code> if the end of the compressed
281 data output stream has been reached.</DL>
282</DD>
283</DL>
284<HR>
285
286<A NAME="decompress(byte[], int, int)"><!-- --></A><H3>
287decompress</H3>
288<PRE>
289int <B>decompress</B>(byte[]&nbsp;b,
290               int&nbsp;off,
291               int&nbsp;len)
292               throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
293<DL>
294<DD>Fills specified buffer with uncompressed data. Returns actual number
295 of bytes of uncompressed data. A return value of 0 indicates that
296 #needsInput() should be called in order to determine if more input
297 data is required.
298<P>
299<DD><DL>
300<DT><B>Parameters:</B><DD><CODE>b</CODE> - Buffer for the compressed data<DD><CODE>off</CODE> - Start offset of the data<DD><CODE>len</CODE> - Size of the buffer
301<DT><B>Returns:</B><DD>The actual number of bytes of compressed data.
302<DT><B>Throws:</B>
303<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
304</DD>
305</DL>
306<HR>
307
308<A NAME="reset()"><!-- --></A><H3>
309reset</H3>
310<PRE>
311void <B>reset</B>()</PRE>
312<DL>
313<DD>Resets decompressor so that a new set of input data can be processed.
314<P>
315<DD><DL>
316</DL>
317</DD>
318</DL>
319<HR>
320
321<A NAME="end()"><!-- --></A><H3>
322end</H3>
323<PRE>
324void <B>end</B>()</PRE>
325<DL>
326<DD>Closes the decompressor and discards any unprocessed input.
327<P>
328<DD><DL>
329</DL>
330</DD>
331</DL>
332<!-- ========= END OF CLASS DATA ========= -->
333<HR>
334
335
336<!-- ======= START OF BOTTOM NAVBAR ====== -->
337<A NAME="navbar_bottom"><!-- --></A>
338<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
339<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
340<TR>
341<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
342<A NAME="navbar_bottom_firstrow"><!-- --></A>
343<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
344  <TR ALIGN="center" VALIGN="top">
345  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
346  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
347  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
348  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Decompressor.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
349  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
350  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
351  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
352  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
353  </TR>
354</TABLE>
355</TD>
356<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
357</EM>
358</TD>
359</TR>
360
361<TR>
362<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
363&nbsp;<A HREF="../../../../../org/apache/hadoop/io/compress/CompressorStream.html" title="class in org.apache.hadoop.io.compress"><B>PREV CLASS</B></A>&nbsp;
364&nbsp;<A HREF="../../../../../org/apache/hadoop/io/compress/DecompressorStream.html" title="class in org.apache.hadoop.io.compress"><B>NEXT CLASS</B></A></FONT></TD>
365<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
366  <A HREF="../../../../../index.html?org/apache/hadoop/io/compress/Decompressor.html" target="_top"><B>FRAMES</B></A>  &nbsp;
367&nbsp;<A HREF="Decompressor.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
368&nbsp;<SCRIPT type="text/javascript">
369  <!--
370  if(window==top) {
371    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
372  }
373  //-->
374</SCRIPT>
375<NOSCRIPT>
376  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
377</NOSCRIPT>
378
379
380</FONT></TD>
381</TR>
382<TR>
383<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
384  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
385<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
386DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
387</TR>
388</TABLE>
389<A NAME="skip-navbar_bottom"></A>
390<!-- ======== END OF BOTTOM NAVBAR ======= -->
391
392<HR>
393Copyright &copy; 2009 The Apache Software Foundation
394</BODY>
395</HTML>
Note: See TracBrowser for help on using the repository browser.