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> |
---|
7 | CBZip2OutputStream (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"> |
---|
15 | function windowTitle() |
---|
16 | { |
---|
17 | if (location.href.indexOf('is-external=true') == -1) { |
---|
18 | parent.document.title="CBZip2OutputStream (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> </TD> |
---|
41 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
---|
42 | <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
---|
43 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/CBZip2OutputStream.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
---|
44 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
---|
45 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
---|
46 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
---|
47 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </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 | <A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/CBZip2InputStream.html" title="class in org.apache.hadoop.io.compress.bzip2"><B>PREV CLASS</B></A> |
---|
59 | NEXT CLASS</FONT></TD> |
---|
60 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
---|
61 | <A HREF="../../../../../../index.html?org/apache/hadoop/io/compress/bzip2/CBZip2OutputStream.html" target="_top"><B>FRAMES</B></A> |
---|
62 | <A HREF="CBZip2OutputStream.html" target="_top"><B>NO FRAMES</B></A> |
---|
63 | <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: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
---|
80 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
81 | DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <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"> |
---|
91 | org.apache.hadoop.io.compress.bzip2</FONT> |
---|
92 | <BR> |
---|
93 | Class CBZip2OutputStream</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 "><B>org.apache.hadoop.io.compress.bzip2.CBZip2OutputStream</B> |
---|
98 | </PRE> |
---|
99 | <DL> |
---|
100 | <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>, <A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/BZip2Constants.html" title="interface in org.apache.hadoop.io.compress.bzip2">BZip2Constants</A></DD> |
---|
101 | </DL> |
---|
102 | <HR> |
---|
103 | <DL> |
---|
104 | <DT><PRE>public class <B>CBZip2OutputStream</B><DT>extends <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><DT>implements <A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/BZip2Constants.html" title="interface in org.apache.hadoop.io.compress.bzip2">BZip2Constants</A></DL> |
---|
105 | </PRE> |
---|
106 | |
---|
107 | <P> |
---|
108 | An output stream that compresses into the BZip2 format (without the file |
---|
109 | header chars) into another stream. |
---|
110 | |
---|
111 | <p> |
---|
112 | The compression requires large amounts of memory. Thus you should call the |
---|
113 | <A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/CBZip2OutputStream.html#close()"><CODE>close()</CODE></A> method as soon as possible, to force |
---|
114 | <tt>CBZip2OutputStream</tt> to release the allocated memory. |
---|
115 | </p> |
---|
116 | |
---|
117 | <p> |
---|
118 | You can shrink the amount of allocated memory and maybe raise the compression |
---|
119 | speed by choosing a lower blocksize, which in turn may cause a lower |
---|
120 | compression ratio. You can avoid unnecessary memory allocation by avoiding |
---|
121 | using a blocksize which is bigger than the size of the input. |
---|
122 | </p> |
---|
123 | |
---|
124 | <p> |
---|
125 | You can compute the memory usage for compressing by the following formula: |
---|
126 | </p> |
---|
127 | |
---|
128 | <pre> |
---|
129 | <code>400k + (9 * blocksize)</code>. |
---|
130 | </pre> |
---|
131 | |
---|
132 | <p> |
---|
133 | To get the memory required for decompression by <A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/CBZip2InputStream.html" title="class in org.apache.hadoop.io.compress.bzip2"><CODE>CBZip2InputStream</CODE></A> use |
---|
134 | </p> |
---|
135 | |
---|
136 | <pre> |
---|
137 | <code>65k + (5 * blocksize)</code>. |
---|
138 | </pre> |
---|
139 | |
---|
140 | <table width="100%" border="1"> |
---|
141 | <colgroup> <col width="33%" /> <col width="33%" /> <col width="33%" /> |
---|
142 | </colgroup> |
---|
143 | <tr> |
---|
144 | <th colspan="3">Memory usage by blocksize</th> |
---|
145 | </tr> |
---|
146 | <tr> |
---|
147 | <th align="right">Blocksize</th> <th align="right">Compression<br> |
---|
148 | memory usage</th> <th align="right">Decompression<br> |
---|
149 | memory usage</th> |
---|
150 | </tr> |
---|
151 | <tr> |
---|
152 | <td align="right">100k</td> |
---|
153 | <td align="right">1300k</td> |
---|
154 | <td align="right">565k</td> |
---|
155 | </tr> |
---|
156 | <tr> |
---|
157 | <td align="right">200k</td> |
---|
158 | <td align="right">2200k</td> |
---|
159 | <td align="right">1065k</td> |
---|
160 | </tr> |
---|
161 | <tr> |
---|
162 | <td align="right">300k</td> |
---|
163 | <td align="right">3100k</td> |
---|
164 | <td align="right">1565k</td> |
---|
165 | </tr> |
---|
166 | <tr> |
---|
167 | <td align="right">400k</td> |
---|
168 | <td align="right">4000k</td> |
---|
169 | <td align="right">2065k</td> |
---|
170 | </tr> |
---|
171 | <tr> |
---|
172 | <td align="right">500k</td> |
---|
173 | <td align="right">4900k</td> |
---|
174 | <td align="right">2565k</td> |
---|
175 | </tr> |
---|
176 | <tr> |
---|
177 | <td align="right">600k</td> |
---|
178 | <td align="right">5800k</td> |
---|
179 | <td align="right">3065k</td> |
---|
180 | </tr> |
---|
181 | <tr> |
---|
182 | <td align="right">700k</td> |
---|
183 | <td align="right">6700k</td> |
---|
184 | <td align="right">3565k</td> |
---|
185 | </tr> |
---|
186 | <tr> |
---|
187 | <td align="right">800k</td> |
---|
188 | <td align="right">7600k</td> |
---|
189 | <td align="right">4065k</td> |
---|
190 | </tr> |
---|
191 | <tr> |
---|
192 | <td align="right">900k</td> |
---|
193 | <td align="right">8500k</td> |
---|
194 | <td align="right">4565k</td> |
---|
195 | </tr> |
---|
196 | </table> |
---|
197 | |
---|
198 | <p> |
---|
199 | For decompression <tt>CBZip2InputStream</tt> allocates less memory if the |
---|
200 | bzipped input is smaller than one block. |
---|
201 | </p> |
---|
202 | |
---|
203 | <p> |
---|
204 | Instances of this class are not threadsafe. |
---|
205 | </p> |
---|
206 | |
---|
207 | <p> |
---|
208 | TODO: Update to BZip2 1.0.1 |
---|
209 | </p> |
---|
210 | <P> |
---|
211 | |
---|
212 | <P> |
---|
213 | <HR> |
---|
214 | |
---|
215 | <P> |
---|
216 | <!-- =========== FIELD SUMMARY =========== --> |
---|
217 | |
---|
218 | <A NAME="field_summary"><!-- --></A> |
---|
219 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
220 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
221 | <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
---|
222 | <B>Field Summary</B></FONT></TH> |
---|
223 | </TR> |
---|
224 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
225 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
226 | <CODE>protected static int</CODE></FONT></TD> |
---|
227 | <TD><CODE><B><A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/CBZip2OutputStream.html#CLEARMASK">CLEARMASK</A></B></CODE> |
---|
228 | |
---|
229 | <BR> |
---|
230 | This constant is accessible by subclasses for historical purposes.</TD> |
---|
231 | </TR> |
---|
232 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
233 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
234 | <CODE>protected static int</CODE></FONT></TD> |
---|
235 | <TD><CODE><B><A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/CBZip2OutputStream.html#DEPTH_THRESH">DEPTH_THRESH</A></B></CODE> |
---|
236 | |
---|
237 | <BR> |
---|
238 | This constant is accessible by subclasses for historical purposes.</TD> |
---|
239 | </TR> |
---|
240 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
241 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
242 | <CODE>protected static int</CODE></FONT></TD> |
---|
243 | <TD><CODE><B><A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/CBZip2OutputStream.html#GREATER_ICOST">GREATER_ICOST</A></B></CODE> |
---|
244 | |
---|
245 | <BR> |
---|
246 | This constant is accessible by subclasses for historical purposes.</TD> |
---|
247 | </TR> |
---|
248 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
249 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
250 | <CODE>protected static int</CODE></FONT></TD> |
---|
251 | <TD><CODE><B><A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/CBZip2OutputStream.html#LESSER_ICOST">LESSER_ICOST</A></B></CODE> |
---|
252 | |
---|
253 | <BR> |
---|
254 | This constant is accessible by subclasses for historical purposes.</TD> |
---|
255 | </TR> |
---|
256 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
257 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
258 | <CODE>static int</CODE></FONT></TD> |
---|
259 | <TD><CODE><B><A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/CBZip2OutputStream.html#MAX_BLOCKSIZE">MAX_BLOCKSIZE</A></B></CODE> |
---|
260 | |
---|
261 | <BR> |
---|
262 | The maximum supported blocksize <tt> == 9</tt>.</TD> |
---|
263 | </TR> |
---|
264 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
265 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
266 | <CODE>static int</CODE></FONT></TD> |
---|
267 | <TD><CODE><B><A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/CBZip2OutputStream.html#MIN_BLOCKSIZE">MIN_BLOCKSIZE</A></B></CODE> |
---|
268 | |
---|
269 | <BR> |
---|
270 | The minimum supported blocksize <tt> == 1</tt>.</TD> |
---|
271 | </TR> |
---|
272 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
273 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
274 | <CODE>protected static int</CODE></FONT></TD> |
---|
275 | <TD><CODE><B><A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/CBZip2OutputStream.html#QSORT_STACK_SIZE">QSORT_STACK_SIZE</A></B></CODE> |
---|
276 | |
---|
277 | <BR> |
---|
278 | This constant is accessible by subclasses for historical purposes.</TD> |
---|
279 | </TR> |
---|
280 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
281 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
282 | <CODE>protected static int</CODE></FONT></TD> |
---|
283 | <TD><CODE><B><A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/CBZip2OutputStream.html#SETMASK">SETMASK</A></B></CODE> |
---|
284 | |
---|
285 | <BR> |
---|
286 | This constant is accessible by subclasses for historical purposes.</TD> |
---|
287 | </TR> |
---|
288 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
289 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
290 | <CODE>protected static int</CODE></FONT></TD> |
---|
291 | <TD><CODE><B><A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/CBZip2OutputStream.html#SMALL_THRESH">SMALL_THRESH</A></B></CODE> |
---|
292 | |
---|
293 | <BR> |
---|
294 | This constant is accessible by subclasses for historical purposes.</TD> |
---|
295 | </TR> |
---|
296 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
297 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
298 | <CODE>protected static int</CODE></FONT></TD> |
---|
299 | <TD><CODE><B><A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/CBZip2OutputStream.html#WORK_FACTOR">WORK_FACTOR</A></B></CODE> |
---|
300 | |
---|
301 | <BR> |
---|
302 | This constant is accessible by subclasses for historical purposes.</TD> |
---|
303 | </TR> |
---|
304 | </TABLE> |
---|
305 | <A NAME="fields_inherited_from_class_org.apache.hadoop.io.compress.bzip2.BZip2Constants"><!-- --></A> |
---|
306 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
307 | <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
---|
308 | <TH ALIGN="left"><B>Fields inherited from interface org.apache.hadoop.io.compress.bzip2.<A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/BZip2Constants.html" title="interface in org.apache.hadoop.io.compress.bzip2">BZip2Constants</A></B></TH> |
---|
309 | </TR> |
---|
310 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
311 | <TD><CODE><A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/BZip2Constants.html#baseBlockSize">baseBlockSize</A>, <A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/BZip2Constants.html#G_SIZE">G_SIZE</A>, <A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/BZip2Constants.html#MAX_ALPHA_SIZE">MAX_ALPHA_SIZE</A>, <A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/BZip2Constants.html#MAX_CODE_LEN">MAX_CODE_LEN</A>, <A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/BZip2Constants.html#MAX_SELECTORS">MAX_SELECTORS</A>, <A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/BZip2Constants.html#N_GROUPS">N_GROUPS</A>, <A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/BZip2Constants.html#N_ITERS">N_ITERS</A>, <A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/BZip2Constants.html#NUM_OVERSHOOT_BYTES">NUM_OVERSHOOT_BYTES</A>, <A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/BZip2Constants.html#rNums">rNums</A>, <A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/BZip2Constants.html#RUNA">RUNA</A>, <A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/BZip2Constants.html#RUNB">RUNB</A></CODE></TD> |
---|
312 | </TR> |
---|
313 | </TABLE> |
---|
314 | |
---|
315 | <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
---|
316 | |
---|
317 | <A NAME="constructor_summary"><!-- --></A> |
---|
318 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
319 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
320 | <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
---|
321 | <B>Constructor Summary</B></FONT></TH> |
---|
322 | </TR> |
---|
323 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
324 | <TD><CODE><B><A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/CBZip2OutputStream.html#CBZip2OutputStream(java.io.OutputStream)">CBZip2OutputStream</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> out)</CODE> |
---|
325 | |
---|
326 | <BR> |
---|
327 | Constructs a new <tt>CBZip2OutputStream</tt> with a blocksize of 900k.</TD> |
---|
328 | </TR> |
---|
329 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
330 | <TD><CODE><B><A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/CBZip2OutputStream.html#CBZip2OutputStream(java.io.OutputStream, int)">CBZip2OutputStream</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> out, |
---|
331 | int blockSize)</CODE> |
---|
332 | |
---|
333 | <BR> |
---|
334 | Constructs a new <tt>CBZip2OutputStream</tt> with specified blocksize.</TD> |
---|
335 | </TR> |
---|
336 | </TABLE> |
---|
337 | |
---|
338 | <!-- ========== METHOD SUMMARY =========== --> |
---|
339 | |
---|
340 | <A NAME="method_summary"><!-- --></A> |
---|
341 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
342 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
343 | <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
---|
344 | <B>Method Summary</B></FONT></TH> |
---|
345 | </TR> |
---|
346 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
347 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
348 | <CODE>static int</CODE></FONT></TD> |
---|
349 | <TD><CODE><B><A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/CBZip2OutputStream.html#chooseBlockSize(long)">chooseBlockSize</A></B>(long inputLength)</CODE> |
---|
350 | |
---|
351 | <BR> |
---|
352 | Chooses a blocksize based on the given length of the data to compress.</TD> |
---|
353 | </TR> |
---|
354 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
355 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
356 | <CODE> void</CODE></FONT></TD> |
---|
357 | <TD><CODE><B><A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/CBZip2OutputStream.html#close()">close</A></B>()</CODE> |
---|
358 | |
---|
359 | <BR> |
---|
360 | </TD> |
---|
361 | </TR> |
---|
362 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
363 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
364 | <CODE>protected void</CODE></FONT></TD> |
---|
365 | <TD><CODE><B><A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/CBZip2OutputStream.html#finalize()">finalize</A></B>()</CODE> |
---|
366 | |
---|
367 | <BR> |
---|
368 | Overriden to close the stream.</TD> |
---|
369 | </TR> |
---|
370 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
371 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
372 | <CODE> void</CODE></FONT></TD> |
---|
373 | <TD><CODE><B><A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/CBZip2OutputStream.html#finish()">finish</A></B>()</CODE> |
---|
374 | |
---|
375 | <BR> |
---|
376 | </TD> |
---|
377 | </TR> |
---|
378 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
379 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
380 | <CODE> void</CODE></FONT></TD> |
---|
381 | <TD><CODE><B><A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/CBZip2OutputStream.html#flush()">flush</A></B>()</CODE> |
---|
382 | |
---|
383 | <BR> |
---|
384 | </TD> |
---|
385 | </TR> |
---|
386 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
387 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
388 | <CODE> int</CODE></FONT></TD> |
---|
389 | <TD><CODE><B><A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/CBZip2OutputStream.html#getBlockSize()">getBlockSize</A></B>()</CODE> |
---|
390 | |
---|
391 | <BR> |
---|
392 | Returns the blocksize parameter specified at construction time.</TD> |
---|
393 | </TR> |
---|
394 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
395 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
396 | <CODE>protected static void</CODE></FONT></TD> |
---|
397 | <TD><CODE><B><A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/CBZip2OutputStream.html#hbMakeCodeLengths(char[], int[], int, int)">hbMakeCodeLengths</A></B>(char[] len, |
---|
398 | int[] freq, |
---|
399 | int alphaSize, |
---|
400 | int maxLen)</CODE> |
---|
401 | |
---|
402 | <BR> |
---|
403 | This method is accessible by subclasses for historical purposes.</TD> |
---|
404 | </TR> |
---|
405 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
406 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
407 | <CODE> void</CODE></FONT></TD> |
---|
408 | <TD><CODE><B><A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/CBZip2OutputStream.html#write(byte[], int, int)">write</A></B>(byte[] buf, |
---|
409 | int offs, |
---|
410 | int len)</CODE> |
---|
411 | |
---|
412 | <BR> |
---|
413 | </TD> |
---|
414 | </TR> |
---|
415 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
416 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
417 | <CODE> void</CODE></FONT></TD> |
---|
418 | <TD><CODE><B><A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/CBZip2OutputStream.html#write(int)">write</A></B>(int b)</CODE> |
---|
419 | |
---|
420 | <BR> |
---|
421 | </TD> |
---|
422 | </TR> |
---|
423 | </TABLE> |
---|
424 | <A NAME="methods_inherited_from_class_java.io.OutputStream"><!-- --></A> |
---|
425 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
426 | <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
---|
427 | <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> |
---|
428 | </TR> |
---|
429 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
430 | <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> |
---|
431 | </TR> |
---|
432 | </TABLE> |
---|
433 | <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> |
---|
434 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
435 | <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
---|
436 | <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> |
---|
437 | </TR> |
---|
438 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
439 | <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#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> |
---|
440 | </TR> |
---|
441 | </TABLE> |
---|
442 | |
---|
443 | <P> |
---|
444 | |
---|
445 | <!-- ============ FIELD DETAIL =========== --> |
---|
446 | |
---|
447 | <A NAME="field_detail"><!-- --></A> |
---|
448 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
449 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
450 | <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
---|
451 | <B>Field Detail</B></FONT></TH> |
---|
452 | </TR> |
---|
453 | </TABLE> |
---|
454 | |
---|
455 | <A NAME="MIN_BLOCKSIZE"><!-- --></A><H3> |
---|
456 | MIN_BLOCKSIZE</H3> |
---|
457 | <PRE> |
---|
458 | public static final int <B>MIN_BLOCKSIZE</B></PRE> |
---|
459 | <DL> |
---|
460 | <DD>The minimum supported blocksize <tt> == 1</tt>. |
---|
461 | <P> |
---|
462 | <DL> |
---|
463 | <DT><B>See Also:</B><DD><A HREF="../../../../../../constant-values.html#org.apache.hadoop.io.compress.bzip2.CBZip2OutputStream.MIN_BLOCKSIZE">Constant Field Values</A></DL> |
---|
464 | </DL> |
---|
465 | <HR> |
---|
466 | |
---|
467 | <A NAME="MAX_BLOCKSIZE"><!-- --></A><H3> |
---|
468 | MAX_BLOCKSIZE</H3> |
---|
469 | <PRE> |
---|
470 | public static final int <B>MAX_BLOCKSIZE</B></PRE> |
---|
471 | <DL> |
---|
472 | <DD>The maximum supported blocksize <tt> == 9</tt>. |
---|
473 | <P> |
---|
474 | <DL> |
---|
475 | <DT><B>See Also:</B><DD><A HREF="../../../../../../constant-values.html#org.apache.hadoop.io.compress.bzip2.CBZip2OutputStream.MAX_BLOCKSIZE">Constant Field Values</A></DL> |
---|
476 | </DL> |
---|
477 | <HR> |
---|
478 | |
---|
479 | <A NAME="SETMASK"><!-- --></A><H3> |
---|
480 | SETMASK</H3> |
---|
481 | <PRE> |
---|
482 | protected static final int <B>SETMASK</B></PRE> |
---|
483 | <DL> |
---|
484 | <DD>This constant is accessible by subclasses for historical purposes. If you |
---|
485 | don't know what it means then you don't need it. |
---|
486 | <P> |
---|
487 | <DL> |
---|
488 | <DT><B>See Also:</B><DD><A HREF="../../../../../../constant-values.html#org.apache.hadoop.io.compress.bzip2.CBZip2OutputStream.SETMASK">Constant Field Values</A></DL> |
---|
489 | </DL> |
---|
490 | <HR> |
---|
491 | |
---|
492 | <A NAME="CLEARMASK"><!-- --></A><H3> |
---|
493 | CLEARMASK</H3> |
---|
494 | <PRE> |
---|
495 | protected static final int <B>CLEARMASK</B></PRE> |
---|
496 | <DL> |
---|
497 | <DD>This constant is accessible by subclasses for historical purposes. If you |
---|
498 | don't know what it means then you don't need it. |
---|
499 | <P> |
---|
500 | <DL> |
---|
501 | <DT><B>See Also:</B><DD><A HREF="../../../../../../constant-values.html#org.apache.hadoop.io.compress.bzip2.CBZip2OutputStream.CLEARMASK">Constant Field Values</A></DL> |
---|
502 | </DL> |
---|
503 | <HR> |
---|
504 | |
---|
505 | <A NAME="GREATER_ICOST"><!-- --></A><H3> |
---|
506 | GREATER_ICOST</H3> |
---|
507 | <PRE> |
---|
508 | protected static final int <B>GREATER_ICOST</B></PRE> |
---|
509 | <DL> |
---|
510 | <DD>This constant is accessible by subclasses for historical purposes. If you |
---|
511 | don't know what it means then you don't need it. |
---|
512 | <P> |
---|
513 | <DL> |
---|
514 | <DT><B>See Also:</B><DD><A HREF="../../../../../../constant-values.html#org.apache.hadoop.io.compress.bzip2.CBZip2OutputStream.GREATER_ICOST">Constant Field Values</A></DL> |
---|
515 | </DL> |
---|
516 | <HR> |
---|
517 | |
---|
518 | <A NAME="LESSER_ICOST"><!-- --></A><H3> |
---|
519 | LESSER_ICOST</H3> |
---|
520 | <PRE> |
---|
521 | protected static final int <B>LESSER_ICOST</B></PRE> |
---|
522 | <DL> |
---|
523 | <DD>This constant is accessible by subclasses for historical purposes. If you |
---|
524 | don't know what it means then you don't need it. |
---|
525 | <P> |
---|
526 | <DL> |
---|
527 | <DT><B>See Also:</B><DD><A HREF="../../../../../../constant-values.html#org.apache.hadoop.io.compress.bzip2.CBZip2OutputStream.LESSER_ICOST">Constant Field Values</A></DL> |
---|
528 | </DL> |
---|
529 | <HR> |
---|
530 | |
---|
531 | <A NAME="SMALL_THRESH"><!-- --></A><H3> |
---|
532 | SMALL_THRESH</H3> |
---|
533 | <PRE> |
---|
534 | protected static final int <B>SMALL_THRESH</B></PRE> |
---|
535 | <DL> |
---|
536 | <DD>This constant is accessible by subclasses for historical purposes. If you |
---|
537 | don't know what it means then you don't need it. |
---|
538 | <P> |
---|
539 | <DL> |
---|
540 | <DT><B>See Also:</B><DD><A HREF="../../../../../../constant-values.html#org.apache.hadoop.io.compress.bzip2.CBZip2OutputStream.SMALL_THRESH">Constant Field Values</A></DL> |
---|
541 | </DL> |
---|
542 | <HR> |
---|
543 | |
---|
544 | <A NAME="DEPTH_THRESH"><!-- --></A><H3> |
---|
545 | DEPTH_THRESH</H3> |
---|
546 | <PRE> |
---|
547 | protected static final int <B>DEPTH_THRESH</B></PRE> |
---|
548 | <DL> |
---|
549 | <DD>This constant is accessible by subclasses for historical purposes. If you |
---|
550 | don't know what it means then you don't need it. |
---|
551 | <P> |
---|
552 | <DL> |
---|
553 | <DT><B>See Also:</B><DD><A HREF="../../../../../../constant-values.html#org.apache.hadoop.io.compress.bzip2.CBZip2OutputStream.DEPTH_THRESH">Constant Field Values</A></DL> |
---|
554 | </DL> |
---|
555 | <HR> |
---|
556 | |
---|
557 | <A NAME="WORK_FACTOR"><!-- --></A><H3> |
---|
558 | WORK_FACTOR</H3> |
---|
559 | <PRE> |
---|
560 | protected static final int <B>WORK_FACTOR</B></PRE> |
---|
561 | <DL> |
---|
562 | <DD>This constant is accessible by subclasses for historical purposes. If you |
---|
563 | don't know what it means then you don't need it. |
---|
564 | <P> |
---|
565 | <DL> |
---|
566 | <DT><B>See Also:</B><DD><A HREF="../../../../../../constant-values.html#org.apache.hadoop.io.compress.bzip2.CBZip2OutputStream.WORK_FACTOR">Constant Field Values</A></DL> |
---|
567 | </DL> |
---|
568 | <HR> |
---|
569 | |
---|
570 | <A NAME="QSORT_STACK_SIZE"><!-- --></A><H3> |
---|
571 | QSORT_STACK_SIZE</H3> |
---|
572 | <PRE> |
---|
573 | protected static final int <B>QSORT_STACK_SIZE</B></PRE> |
---|
574 | <DL> |
---|
575 | <DD>This constant is accessible by subclasses for historical purposes. If you |
---|
576 | don't know what it means then you don't need it. |
---|
577 | <p> |
---|
578 | If you are ever unlucky/improbable enough to get a stack overflow whilst |
---|
579 | sorting, increase the following constant and try again. In practice I |
---|
580 | have never seen the stack go above 27 elems, so the following limit seems |
---|
581 | very generous. |
---|
582 | </p> |
---|
583 | <P> |
---|
584 | <DL> |
---|
585 | <DT><B>See Also:</B><DD><A HREF="../../../../../../constant-values.html#org.apache.hadoop.io.compress.bzip2.CBZip2OutputStream.QSORT_STACK_SIZE">Constant Field Values</A></DL> |
---|
586 | </DL> |
---|
587 | |
---|
588 | <!-- ========= CONSTRUCTOR DETAIL ======== --> |
---|
589 | |
---|
590 | <A NAME="constructor_detail"><!-- --></A> |
---|
591 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
592 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
593 | <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
---|
594 | <B>Constructor Detail</B></FONT></TH> |
---|
595 | </TR> |
---|
596 | </TABLE> |
---|
597 | |
---|
598 | <A NAME="CBZip2OutputStream(java.io.OutputStream)"><!-- --></A><H3> |
---|
599 | CBZip2OutputStream</H3> |
---|
600 | <PRE> |
---|
601 | public <B>CBZip2OutputStream</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> out) |
---|
602 | 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> |
---|
603 | <DL> |
---|
604 | <DD>Constructs a new <tt>CBZip2OutputStream</tt> with a blocksize of 900k. |
---|
605 | |
---|
606 | <p> |
---|
607 | <b>Attention: </b>The caller is resonsible to write the two BZip2 magic |
---|
608 | bytes <tt>"BZ"</tt> to the specified stream prior to calling this |
---|
609 | constructor. |
---|
610 | </p> |
---|
611 | <P> |
---|
612 | <DL> |
---|
613 | <DT><B>Parameters:</B><DD><CODE>out</CODE> - * |
---|
614 | the destination stream. |
---|
615 | <DT><B>Throws:</B> |
---|
616 | <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> - if an I/O error occurs in the specified stream. |
---|
617 | <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</A></CODE> - if <code>out == null</code>.</DL> |
---|
618 | </DL> |
---|
619 | <HR> |
---|
620 | |
---|
621 | <A NAME="CBZip2OutputStream(java.io.OutputStream, int)"><!-- --></A><H3> |
---|
622 | CBZip2OutputStream</H3> |
---|
623 | <PRE> |
---|
624 | public <B>CBZip2OutputStream</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> out, |
---|
625 | int blockSize) |
---|
626 | 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> |
---|
627 | <DL> |
---|
628 | <DD>Constructs a new <tt>CBZip2OutputStream</tt> with specified blocksize. |
---|
629 | |
---|
630 | <p> |
---|
631 | <b>Attention: </b>The caller is resonsible to write the two BZip2 magic |
---|
632 | bytes <tt>"BZ"</tt> to the specified stream prior to calling this |
---|
633 | constructor. |
---|
634 | </p> |
---|
635 | <P> |
---|
636 | <DL> |
---|
637 | <DT><B>Parameters:</B><DD><CODE>out</CODE> - the destination stream.<DD><CODE>blockSize</CODE> - the blockSize as 100k units. |
---|
638 | <DT><B>Throws:</B> |
---|
639 | <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> - if an I/O error occurs in the specified stream. |
---|
640 | <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if <code>(blockSize < 1) || (blockSize > 9)</code>. |
---|
641 | <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</A></CODE> - if <code>out == null</code>.<DT><B>See Also:</B><DD><A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/CBZip2OutputStream.html#MIN_BLOCKSIZE"><CODE>MIN_BLOCKSIZE</CODE></A>, |
---|
642 | <A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/CBZip2OutputStream.html#MAX_BLOCKSIZE"><CODE>MAX_BLOCKSIZE</CODE></A></DL> |
---|
643 | </DL> |
---|
644 | |
---|
645 | <!-- ============ METHOD DETAIL ========== --> |
---|
646 | |
---|
647 | <A NAME="method_detail"><!-- --></A> |
---|
648 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
649 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
650 | <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
---|
651 | <B>Method Detail</B></FONT></TH> |
---|
652 | </TR> |
---|
653 | </TABLE> |
---|
654 | |
---|
655 | <A NAME="hbMakeCodeLengths(char[], int[], int, int)"><!-- --></A><H3> |
---|
656 | hbMakeCodeLengths</H3> |
---|
657 | <PRE> |
---|
658 | protected static void <B>hbMakeCodeLengths</B>(char[] len, |
---|
659 | int[] freq, |
---|
660 | int alphaSize, |
---|
661 | int maxLen)</PRE> |
---|
662 | <DL> |
---|
663 | <DD>This method is accessible by subclasses for historical purposes. If you |
---|
664 | don't know what it does then you don't need it. |
---|
665 | <P> |
---|
666 | <DD><DL> |
---|
667 | </DL> |
---|
668 | </DD> |
---|
669 | <DD><DL> |
---|
670 | </DL> |
---|
671 | </DD> |
---|
672 | </DL> |
---|
673 | <HR> |
---|
674 | |
---|
675 | <A NAME="chooseBlockSize(long)"><!-- --></A><H3> |
---|
676 | chooseBlockSize</H3> |
---|
677 | <PRE> |
---|
678 | public static int <B>chooseBlockSize</B>(long inputLength)</PRE> |
---|
679 | <DL> |
---|
680 | <DD>Chooses a blocksize based on the given length of the data to compress. |
---|
681 | <P> |
---|
682 | <DD><DL> |
---|
683 | </DL> |
---|
684 | </DD> |
---|
685 | <DD><DL> |
---|
686 | <DT><B>Parameters:</B><DD><CODE>inputLength</CODE> - The length of the data which will be compressed by |
---|
687 | <tt>CBZip2OutputStream</tt>. |
---|
688 | <DT><B>Returns:</B><DD>The blocksize, between <A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/CBZip2OutputStream.html#MIN_BLOCKSIZE"><CODE>MIN_BLOCKSIZE</CODE></A> and |
---|
689 | <A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/CBZip2OutputStream.html#MAX_BLOCKSIZE"><CODE>MAX_BLOCKSIZE</CODE></A> both inclusive. For a negative |
---|
690 | <tt>inputLength</tt> this method returns <tt>MAX_BLOCKSIZE</tt> |
---|
691 | always.</DL> |
---|
692 | </DD> |
---|
693 | </DL> |
---|
694 | <HR> |
---|
695 | |
---|
696 | <A NAME="write(int)"><!-- --></A><H3> |
---|
697 | write</H3> |
---|
698 | <PRE> |
---|
699 | public void <B>write</B>(int b) |
---|
700 | 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> |
---|
701 | <DL> |
---|
702 | <DD><DL> |
---|
703 | <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/OutputStream.html?is-external=true#write(int)" title="class or interface in java.io">write</A></CODE> in class <CODE><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></CODE></DL> |
---|
704 | </DD> |
---|
705 | <DD><DL> |
---|
706 | |
---|
707 | <DT><B>Throws:</B> |
---|
708 | <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> |
---|
709 | </DD> |
---|
710 | </DL> |
---|
711 | <HR> |
---|
712 | |
---|
713 | <A NAME="finalize()"><!-- --></A><H3> |
---|
714 | finalize</H3> |
---|
715 | <PRE> |
---|
716 | protected void <B>finalize</B>() |
---|
717 | throws <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</A></PRE> |
---|
718 | <DL> |
---|
719 | <DD>Overriden to close the stream. |
---|
720 | <P> |
---|
721 | <DD><DL> |
---|
722 | <DT><B>Overrides:</B><DD><CODE><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></CODE> in class <CODE><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></CODE></DL> |
---|
723 | </DD> |
---|
724 | <DD><DL> |
---|
725 | |
---|
726 | <DT><B>Throws:</B> |
---|
727 | <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</A></CODE></DL> |
---|
728 | </DD> |
---|
729 | </DL> |
---|
730 | <HR> |
---|
731 | |
---|
732 | <A NAME="finish()"><!-- --></A><H3> |
---|
733 | finish</H3> |
---|
734 | <PRE> |
---|
735 | public void <B>finish</B>() |
---|
736 | 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> |
---|
737 | <DL> |
---|
738 | <DD><DL> |
---|
739 | </DL> |
---|
740 | </DD> |
---|
741 | <DD><DL> |
---|
742 | |
---|
743 | <DT><B>Throws:</B> |
---|
744 | <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> |
---|
745 | </DD> |
---|
746 | </DL> |
---|
747 | <HR> |
---|
748 | |
---|
749 | <A NAME="close()"><!-- --></A><H3> |
---|
750 | close</H3> |
---|
751 | <PRE> |
---|
752 | public void <B>close</B>() |
---|
753 | 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> |
---|
754 | <DL> |
---|
755 | <DD><DL> |
---|
756 | <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/Closeable.html?is-external=true#close()" title="class or interface in java.io">close</A></CODE> in interface <CODE><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></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/OutputStream.html?is-external=true#close()" title="class or interface in java.io">close</A></CODE> in class <CODE><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></CODE></DL> |
---|
757 | </DD> |
---|
758 | <DD><DL> |
---|
759 | |
---|
760 | <DT><B>Throws:</B> |
---|
761 | <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> |
---|
762 | </DD> |
---|
763 | </DL> |
---|
764 | <HR> |
---|
765 | |
---|
766 | <A NAME="flush()"><!-- --></A><H3> |
---|
767 | flush</H3> |
---|
768 | <PRE> |
---|
769 | public void <B>flush</B>() |
---|
770 | 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> |
---|
771 | <DL> |
---|
772 | <DD><DL> |
---|
773 | <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/Flushable.html?is-external=true#flush()" title="class or interface in java.io">flush</A></CODE> in interface <CODE><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></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/OutputStream.html?is-external=true#flush()" title="class or interface in java.io">flush</A></CODE> in class <CODE><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></CODE></DL> |
---|
774 | </DD> |
---|
775 | <DD><DL> |
---|
776 | |
---|
777 | <DT><B>Throws:</B> |
---|
778 | <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> |
---|
779 | </DD> |
---|
780 | </DL> |
---|
781 | <HR> |
---|
782 | |
---|
783 | <A NAME="getBlockSize()"><!-- --></A><H3> |
---|
784 | getBlockSize</H3> |
---|
785 | <PRE> |
---|
786 | public final int <B>getBlockSize</B>()</PRE> |
---|
787 | <DL> |
---|
788 | <DD>Returns the blocksize parameter specified at construction time. |
---|
789 | <P> |
---|
790 | <DD><DL> |
---|
791 | </DL> |
---|
792 | </DD> |
---|
793 | <DD><DL> |
---|
794 | </DL> |
---|
795 | </DD> |
---|
796 | </DL> |
---|
797 | <HR> |
---|
798 | |
---|
799 | <A NAME="write(byte[], int, int)"><!-- --></A><H3> |
---|
800 | write</H3> |
---|
801 | <PRE> |
---|
802 | public void <B>write</B>(byte[] buf, |
---|
803 | int offs, |
---|
804 | int len) |
---|
805 | 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> |
---|
806 | <DL> |
---|
807 | <DD><DL> |
---|
808 | <DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/OutputStream.html?is-external=true#write(byte[], int, int)" title="class or interface in java.io">write</A></CODE> in class <CODE><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></CODE></DL> |
---|
809 | </DD> |
---|
810 | <DD><DL> |
---|
811 | |
---|
812 | <DT><B>Throws:</B> |
---|
813 | <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> |
---|
814 | </DD> |
---|
815 | </DL> |
---|
816 | <!-- ========= END OF CLASS DATA ========= --> |
---|
817 | <HR> |
---|
818 | |
---|
819 | |
---|
820 | <!-- ======= START OF BOTTOM NAVBAR ====== --> |
---|
821 | <A NAME="navbar_bottom"><!-- --></A> |
---|
822 | <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> |
---|
823 | <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
---|
824 | <TR> |
---|
825 | <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
---|
826 | <A NAME="navbar_bottom_firstrow"><!-- --></A> |
---|
827 | <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
---|
828 | <TR ALIGN="center" VALIGN="top"> |
---|
829 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
---|
830 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
---|
831 | <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
---|
832 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/CBZip2OutputStream.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
---|
833 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
---|
834 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
---|
835 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
---|
836 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
---|
837 | </TR> |
---|
838 | </TABLE> |
---|
839 | </TD> |
---|
840 | <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
---|
841 | </EM> |
---|
842 | </TD> |
---|
843 | </TR> |
---|
844 | |
---|
845 | <TR> |
---|
846 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
---|
847 | <A HREF="../../../../../../org/apache/hadoop/io/compress/bzip2/CBZip2InputStream.html" title="class in org.apache.hadoop.io.compress.bzip2"><B>PREV CLASS</B></A> |
---|
848 | NEXT CLASS</FONT></TD> |
---|
849 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
---|
850 | <A HREF="../../../../../../index.html?org/apache/hadoop/io/compress/bzip2/CBZip2OutputStream.html" target="_top"><B>FRAMES</B></A> |
---|
851 | <A HREF="CBZip2OutputStream.html" target="_top"><B>NO FRAMES</B></A> |
---|
852 | <SCRIPT type="text/javascript"> |
---|
853 | <!-- |
---|
854 | if(window==top) { |
---|
855 | document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
---|
856 | } |
---|
857 | //--> |
---|
858 | </SCRIPT> |
---|
859 | <NOSCRIPT> |
---|
860 | <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A> |
---|
861 | </NOSCRIPT> |
---|
862 | |
---|
863 | |
---|
864 | </FONT></TD> |
---|
865 | </TR> |
---|
866 | <TR> |
---|
867 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
868 | SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
---|
869 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
870 | DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
---|
871 | </TR> |
---|
872 | </TABLE> |
---|
873 | <A NAME="skip-navbar_bottom"></A> |
---|
874 | <!-- ======== END OF BOTTOM NAVBAR ======= --> |
---|
875 | |
---|
876 | <HR> |
---|
877 | Copyright © 2009 The Apache Software Foundation |
---|
878 | </BODY> |
---|
879 | </HTML> |
---|