source: proiecte/HadoopJUnit/hadoop-0.20.1/docs/api/org/apache/hadoop/io/compress/BlockCompressorStream.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: 24.7 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>
7BlockCompressorStream (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="BlockCompressorStream (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/BlockCompressorStream.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;PREV CLASS&nbsp;
59&nbsp;<A HREF="../../../../../org/apache/hadoop/io/compress/BlockDecompressorStream.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/BlockCompressorStream.html" target="_top"><B>FRAMES</B></A>  &nbsp;
62&nbsp;<A HREF="BlockCompressorStream.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;<A HREF="#fields_inherited_from_class_org.apache.hadoop.io.compress.CompressorStream">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
80<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
81DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&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>
93Class BlockCompressorStream</H2>
94<PRE>
95<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
96  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="http://java.sun.com/javase/6/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">java.io.OutputStream</A>
97      <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/apache/hadoop/io/compress/CompressionOutputStream.html" title="class in org.apache.hadoop.io.compress">org.apache.hadoop.io.compress.CompressionOutputStream</A>
98          <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/apache/hadoop/io/compress/CompressorStream.html" title="class in org.apache.hadoop.io.compress">org.apache.hadoop.io.compress.CompressorStream</A>
99              <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.hadoop.io.compress.BlockCompressorStream</B>
100</PRE>
101<DL>
102<DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://java.sun.com/javase/6/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Flushable.html?is-external=true" title="class or interface in java.io">Flushable</A></DD>
103</DL>
104<HR>
105<DL>
106<DT><PRE>public class <B>BlockCompressorStream</B><DT>extends <A HREF="../../../../../org/apache/hadoop/io/compress/CompressorStream.html" title="class in org.apache.hadoop.io.compress">CompressorStream</A></DL>
107</PRE>
108
109<P>
110A <A HREF="../../../../../org/apache/hadoop/io/compress/CompressorStream.html" title="class in org.apache.hadoop.io.compress"><CODE>CompressorStream</CODE></A> which works
111 with 'block-based' based compression algorithms, as opposed to
112 'stream-based' compression algorithms.
113
114 It should be noted that this wrapper does not guarantee that blocks will
115 be sized for the compressor. If the
116 <A HREF="../../../../../org/apache/hadoop/io/compress/Compressor.html" title="interface in org.apache.hadoop.io.compress"><CODE>Compressor</CODE></A> requires buffering to
117 effect meaningful compression, it is responsible for it.
118<P>
119
120<P>
121<HR>
122
123<P>
124<!-- =========== FIELD SUMMARY =========== -->
125
126<A NAME="field_summary"><!-- --></A>
127<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
128<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
129<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
130<B>Field Summary</B></FONT></TH>
131</TR>
132</TABLE>
133&nbsp;<A NAME="fields_inherited_from_class_org.apache.hadoop.io.compress.CompressorStream"><!-- --></A>
134<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
135<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
136<TH ALIGN="left"><B>Fields inherited from class org.apache.hadoop.io.compress.<A HREF="../../../../../org/apache/hadoop/io/compress/CompressorStream.html" title="class in org.apache.hadoop.io.compress">CompressorStream</A></B></TH>
137</TR>
138<TR BGCOLOR="white" CLASS="TableRowColor">
139<TD><CODE><A HREF="../../../../../org/apache/hadoop/io/compress/CompressorStream.html#buffer">buffer</A>, <A HREF="../../../../../org/apache/hadoop/io/compress/CompressorStream.html#closed">closed</A>, <A HREF="../../../../../org/apache/hadoop/io/compress/CompressorStream.html#compressor">compressor</A></CODE></TD>
140</TR>
141</TABLE>
142&nbsp;<A NAME="fields_inherited_from_class_org.apache.hadoop.io.compress.CompressionOutputStream"><!-- --></A>
143<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
144<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
145<TH ALIGN="left"><B>Fields inherited from class org.apache.hadoop.io.compress.<A HREF="../../../../../org/apache/hadoop/io/compress/CompressionOutputStream.html" title="class in org.apache.hadoop.io.compress">CompressionOutputStream</A></B></TH>
146</TR>
147<TR BGCOLOR="white" CLASS="TableRowColor">
148<TD><CODE><A HREF="../../../../../org/apache/hadoop/io/compress/CompressionOutputStream.html#out">out</A></CODE></TD>
149</TR>
150</TABLE>
151&nbsp;
152<!-- ======== CONSTRUCTOR SUMMARY ======== -->
153
154<A NAME="constructor_summary"><!-- --></A>
155<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
156<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
157<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
158<B>Constructor Summary</B></FONT></TH>
159</TR>
160<TR BGCOLOR="white" CLASS="TableRowColor">
161<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/io/compress/BlockCompressorStream.html#BlockCompressorStream(java.io.OutputStream, org.apache.hadoop.io.compress.Compressor)">BlockCompressorStream</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A>&nbsp;out,
162                      <A HREF="../../../../../org/apache/hadoop/io/compress/Compressor.html" title="interface in org.apache.hadoop.io.compress">Compressor</A>&nbsp;compressor)</CODE>
163
164<BR>
165&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a <A HREF="../../../../../org/apache/hadoop/io/compress/BlockCompressorStream.html" title="class in org.apache.hadoop.io.compress"><CODE>BlockCompressorStream</CODE></A> with given output-stream and
166 compressor.</TD>
167</TR>
168<TR BGCOLOR="white" CLASS="TableRowColor">
169<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/io/compress/BlockCompressorStream.html#BlockCompressorStream(java.io.OutputStream, org.apache.hadoop.io.compress.Compressor, int, int)">BlockCompressorStream</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A>&nbsp;out,
170                      <A HREF="../../../../../org/apache/hadoop/io/compress/Compressor.html" title="interface in org.apache.hadoop.io.compress">Compressor</A>&nbsp;compressor,
171                      int&nbsp;bufferSize,
172                      int&nbsp;compressionOverhead)</CODE>
173
174<BR>
175&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a <A HREF="../../../../../org/apache/hadoop/io/compress/BlockCompressorStream.html" title="class in org.apache.hadoop.io.compress"><CODE>BlockCompressorStream</CODE></A>.</TD>
176</TR>
177</TABLE>
178&nbsp;
179<!-- ========== METHOD SUMMARY =========== -->
180
181<A NAME="method_summary"><!-- --></A>
182<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
183<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
184<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
185<B>Method Summary</B></FONT></TH>
186</TR>
187<TR BGCOLOR="white" CLASS="TableRowColor">
188<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
189<CODE>protected &nbsp;void</CODE></FONT></TD>
190<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/io/compress/BlockCompressorStream.html#compress()">compress</A></B>()</CODE>
191
192<BR>
193&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
194</TR>
195<TR BGCOLOR="white" CLASS="TableRowColor">
196<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
197<CODE>&nbsp;void</CODE></FONT></TD>
198<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/io/compress/BlockCompressorStream.html#finish()">finish</A></B>()</CODE>
199
200<BR>
201&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Finishes writing compressed data to the output stream
202 without closing the underlying stream.</TD>
203</TR>
204<TR BGCOLOR="white" CLASS="TableRowColor">
205<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
206<CODE>&nbsp;void</CODE></FONT></TD>
207<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/io/compress/BlockCompressorStream.html#write(byte[], int, int)">write</A></B>(byte[]&nbsp;b,
208      int&nbsp;off,
209      int&nbsp;len)</CODE>
210
211<BR>
212&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Write the data provided to the compression codec, compressing no more
213 than the buffer size less the compression overhead as specified during
214 construction for each block.</TD>
215</TR>
216</TABLE>
217&nbsp;<A NAME="methods_inherited_from_class_org.apache.hadoop.io.compress.CompressorStream"><!-- --></A>
218<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
219<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
220<TH ALIGN="left"><B>Methods inherited from class org.apache.hadoop.io.compress.<A HREF="../../../../../org/apache/hadoop/io/compress/CompressorStream.html" title="class in org.apache.hadoop.io.compress">CompressorStream</A></B></TH>
221</TR>
222<TR BGCOLOR="white" CLASS="TableRowColor">
223<TD><CODE><A HREF="../../../../../org/apache/hadoop/io/compress/CompressorStream.html#close()">close</A>, <A HREF="../../../../../org/apache/hadoop/io/compress/CompressorStream.html#resetState()">resetState</A>, <A HREF="../../../../../org/apache/hadoop/io/compress/CompressorStream.html#write(int)">write</A></CODE></TD>
224</TR>
225</TABLE>
226&nbsp;<A NAME="methods_inherited_from_class_org.apache.hadoop.io.compress.CompressionOutputStream"><!-- --></A>
227<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
228<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
229<TH ALIGN="left"><B>Methods inherited from class org.apache.hadoop.io.compress.<A HREF="../../../../../org/apache/hadoop/io/compress/CompressionOutputStream.html" title="class in org.apache.hadoop.io.compress">CompressionOutputStream</A></B></TH>
230</TR>
231<TR BGCOLOR="white" CLASS="TableRowColor">
232<TD><CODE><A HREF="../../../../../org/apache/hadoop/io/compress/CompressionOutputStream.html#flush()">flush</A></CODE></TD>
233</TR>
234</TABLE>
235&nbsp;<A NAME="methods_inherited_from_class_java.io.OutputStream"><!-- --></A>
236<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
237<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
238<TH ALIGN="left"><B>Methods inherited from class java.io.<A HREF="http://java.sun.com/javase/6/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A></B></TH>
239</TR>
240<TR BGCOLOR="white" CLASS="TableRowColor">
241<TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/OutputStream.html?is-external=true#write(byte[])" title="class or interface in java.io">write</A></CODE></TD>
242</TR>
243</TABLE>
244&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
245<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
246<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
247<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
248</TR>
249<TR BGCOLOR="white" CLASS="TableRowColor">
250<TD><CODE><A HREF="http://java.sun.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://java.sun.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://java.sun.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://java.sun.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://java.sun.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://java.sun.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://java.sun.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://java.sun.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://java.sun.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://java.sun.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://java.sun.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></TD>
251</TR>
252</TABLE>
253&nbsp;
254<P>
255
256<!-- ========= CONSTRUCTOR DETAIL ======== -->
257
258<A NAME="constructor_detail"><!-- --></A>
259<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
260<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
261<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
262<B>Constructor Detail</B></FONT></TH>
263</TR>
264</TABLE>
265
266<A NAME="BlockCompressorStream(java.io.OutputStream, org.apache.hadoop.io.compress.Compressor, int, int)"><!-- --></A><H3>
267BlockCompressorStream</H3>
268<PRE>
269public <B>BlockCompressorStream</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A>&nbsp;out,
270                             <A HREF="../../../../../org/apache/hadoop/io/compress/Compressor.html" title="interface in org.apache.hadoop.io.compress">Compressor</A>&nbsp;compressor,
271                             int&nbsp;bufferSize,
272                             int&nbsp;compressionOverhead)</PRE>
273<DL>
274<DD>Create a <A HREF="../../../../../org/apache/hadoop/io/compress/BlockCompressorStream.html" title="class in org.apache.hadoop.io.compress"><CODE>BlockCompressorStream</CODE></A>.
275<P>
276<DL>
277<DT><B>Parameters:</B><DD><CODE>out</CODE> - stream<DD><CODE>compressor</CODE> - compressor to be used<DD><CODE>bufferSize</CODE> - size of buffer<DD><CODE>compressionOverhead</CODE> - maximum 'overhead' of the compression
278                            algorithm with given bufferSize</DL>
279</DL>
280<HR>
281
282<A NAME="BlockCompressorStream(java.io.OutputStream, org.apache.hadoop.io.compress.Compressor)"><!-- --></A><H3>
283BlockCompressorStream</H3>
284<PRE>
285public <B>BlockCompressorStream</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A>&nbsp;out,
286                             <A HREF="../../../../../org/apache/hadoop/io/compress/Compressor.html" title="interface in org.apache.hadoop.io.compress">Compressor</A>&nbsp;compressor)</PRE>
287<DL>
288<DD>Create a <A HREF="../../../../../org/apache/hadoop/io/compress/BlockCompressorStream.html" title="class in org.apache.hadoop.io.compress"><CODE>BlockCompressorStream</CODE></A> with given output-stream and
289 compressor.
290 Use default of 512 as bufferSize and compressionOverhead of
291 (1% of bufferSize + 12 bytes) =  18 bytes (zlib algorithm).
292<P>
293<DL>
294<DT><B>Parameters:</B><DD><CODE>out</CODE> - stream<DD><CODE>compressor</CODE> - compressor to be used</DL>
295</DL>
296
297<!-- ============ METHOD DETAIL ========== -->
298
299<A NAME="method_detail"><!-- --></A>
300<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
301<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
302<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
303<B>Method Detail</B></FONT></TH>
304</TR>
305</TABLE>
306
307<A NAME="write(byte[], int, int)"><!-- --></A><H3>
308write</H3>
309<PRE>
310public void <B>write</B>(byte[]&nbsp;b,
311                  int&nbsp;off,
312                  int&nbsp;len)
313           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>
314<DL>
315<DD>Write the data provided to the compression codec, compressing no more
316 than the buffer size less the compression overhead as specified during
317 construction for each block.
318
319 Each block contains the uncompressed length for the block, followed by
320 one or more length-prefixed blocks of compressed data.
321<P>
322<DD><DL>
323<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/apache/hadoop/io/compress/CompressorStream.html#write(byte[], int, int)">write</A></CODE> in class <CODE><A HREF="../../../../../org/apache/hadoop/io/compress/CompressorStream.html" title="class in org.apache.hadoop.io.compress">CompressorStream</A></CODE></DL>
324</DD>
325<DD><DL>
326
327<DT><B>Throws:</B>
328<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>
329</DD>
330</DL>
331<HR>
332
333<A NAME="finish()"><!-- --></A><H3>
334finish</H3>
335<PRE>
336public void <B>finish</B>()
337            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>
338<DL>
339<DD><B>Description copied from class: <CODE><A HREF="../../../../../org/apache/hadoop/io/compress/CompressionOutputStream.html#finish()">CompressionOutputStream</A></CODE></B></DD>
340<DD>Finishes writing compressed data to the output stream
341 without closing the underlying stream.
342<P>
343<DD><DL>
344<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/apache/hadoop/io/compress/CompressorStream.html#finish()">finish</A></CODE> in class <CODE><A HREF="../../../../../org/apache/hadoop/io/compress/CompressorStream.html" title="class in org.apache.hadoop.io.compress">CompressorStream</A></CODE></DL>
345</DD>
346<DD><DL>
347
348<DT><B>Throws:</B>
349<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>
350</DD>
351</DL>
352<HR>
353
354<A NAME="compress()"><!-- --></A><H3>
355compress</H3>
356<PRE>
357protected void <B>compress</B>()
358                 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>
359<DL>
360<DD><DL>
361<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/apache/hadoop/io/compress/CompressorStream.html#compress()">compress</A></CODE> in class <CODE><A HREF="../../../../../org/apache/hadoop/io/compress/CompressorStream.html" title="class in org.apache.hadoop.io.compress">CompressorStream</A></CODE></DL>
362</DD>
363<DD><DL>
364
365<DT><B>Throws:</B>
366<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>
367</DD>
368</DL>
369<!-- ========= END OF CLASS DATA ========= -->
370<HR>
371
372
373<!-- ======= START OF BOTTOM NAVBAR ====== -->
374<A NAME="navbar_bottom"><!-- --></A>
375<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
376<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
377<TR>
378<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
379<A NAME="navbar_bottom_firstrow"><!-- --></A>
380<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
381  <TR ALIGN="center" VALIGN="top">
382  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
383  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
384  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
385  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/BlockCompressorStream.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
386  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
387  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
388  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
389  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
390  </TR>
391</TABLE>
392</TD>
393<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
394</EM>
395</TD>
396</TR>
397
398<TR>
399<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
400&nbsp;PREV CLASS&nbsp;
401&nbsp;<A HREF="../../../../../org/apache/hadoop/io/compress/BlockDecompressorStream.html" title="class in org.apache.hadoop.io.compress"><B>NEXT CLASS</B></A></FONT></TD>
402<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
403  <A HREF="../../../../../index.html?org/apache/hadoop/io/compress/BlockCompressorStream.html" target="_top"><B>FRAMES</B></A>  &nbsp;
404&nbsp;<A HREF="BlockCompressorStream.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
405&nbsp;<SCRIPT type="text/javascript">
406  <!--
407  if(window==top) {
408    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
409  }
410  //-->
411</SCRIPT>
412<NOSCRIPT>
413  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
414</NOSCRIPT>
415
416
417</FONT></TD>
418</TR>
419<TR>
420<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
421  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_org.apache.hadoop.io.compress.CompressorStream">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
422<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
423DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
424</TR>
425</TABLE>
426<A NAME="skip-navbar_bottom"></A>
427<!-- ======== END OF BOTTOM NAVBAR ======= -->
428
429<HR>
430Copyright &copy; 2009 The Apache Software Foundation
431</BODY>
432</HTML>
Note: See TracBrowser for help on using the repository browser.