~testplan-team/testplan/source-collection

« back to all changes in this revision

Viewing changes to commons-httpclient-3.1/docs/apidocs/org/apache/commons/httpclient/ChunkedOutputStream.html

  • Committer: edA-qa mort-ora-y
  • Date: 2009-01-28 15:36:51 UTC
  • Revision ID: eda-qa@disemia.com-20090128153651-u4uzd035zyjea16j
adding httpclient

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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.5.0_11) on Sat Aug 18 11:01:00 CEST 2007 -->
 
6
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 
7
<TITLE>
 
8
ChunkedOutputStream (HttpClient 3.1 API)
 
9
</TITLE>
 
10
 
 
11
<META NAME="keywords" CONTENT="org.apache.commons.httpclient.ChunkedOutputStream class">
 
12
 
 
13
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
 
14
 
 
15
<SCRIPT type="text/javascript">
 
16
function windowTitle()
 
17
{
 
18
    parent.document.title="ChunkedOutputStream (HttpClient 3.1 API)";
 
19
}
 
20
</SCRIPT>
 
21
<NOSCRIPT>
 
22
</NOSCRIPT>
 
23
 
 
24
</HEAD>
 
25
 
 
26
<BODY BGCOLOR="white" onload="windowTitle();">
 
27
 
 
28
 
 
29
<!-- ========= START OF TOP NAVBAR ======= -->
 
30
<A NAME="navbar_top"><!-- --></A>
 
31
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
 
32
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
 
33
<TR>
 
34
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
 
35
<A NAME="navbar_top_firstrow"><!-- --></A>
 
36
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
 
37
  <TR ALIGN="center" VALIGN="top">
 
38
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
 
39
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
 
40
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
 
41
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/ChunkedOutputStream.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
 
42
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
 
43
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
 
44
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
 
45
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
 
46
  </TR>
 
47
</TABLE>
 
48
</TD>
 
49
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
 
50
</EM>
 
51
</TD>
 
52
</TR>
 
53
 
 
54
<TR>
 
55
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 
56
&nbsp;<A HREF="../../../../org/apache/commons/httpclient/ChunkedInputStream.html" title="class in org.apache.commons.httpclient"><B>PREV CLASS</B></A>&nbsp;
 
57
&nbsp;<A HREF="../../../../org/apache/commons/httpclient/CircularRedirectException.html" title="class in org.apache.commons.httpclient"><B>NEXT CLASS</B></A></FONT></TD>
 
58
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 
59
  <A HREF="../../../../index.html?org/apache/commons/httpclient/ChunkedOutputStream.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 
60
&nbsp;<A HREF="ChunkedOutputStream.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
 
61
&nbsp;<SCRIPT type="text/javascript">
 
62
  <!--
 
63
  if(window==top) {
 
64
    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
 
65
  }
 
66
  //-->
 
67
</SCRIPT>
 
68
<NOSCRIPT>
 
69
  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
 
70
</NOSCRIPT>
 
71
 
 
72
 
 
73
</FONT></TD>
 
74
</TR>
 
75
<TR>
 
76
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
 
77
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
 
78
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
 
79
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
 
80
</TR>
 
81
</TABLE>
 
82
<A NAME="skip-navbar_top"></A>
 
83
<!-- ========= END OF TOP NAVBAR ========= -->
 
84
 
 
85
<HR>
 
86
<!-- ======== START OF CLASS DATA ======== -->
 
87
<H2>
 
88
<FONT SIZE="-1">
 
89
org.apache.commons.httpclient</FONT>
 
90
<BR>
 
91
Class ChunkedOutputStream</H2>
 
92
<PRE>
 
93
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html" title="class or interface in java.lang">java.lang.Object</A>
 
94
  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/OutputStream.html" title="class or interface in java.io">java.io.OutputStream</A>
 
95
      <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.commons.httpclient.ChunkedOutputStream</B>
 
96
</PRE>
 
97
<DL>
 
98
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Closeable.html" title="class or interface in java.io">Closeable</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Flushable.html" title="class or interface in java.io">Flushable</A></DD>
 
99
</DL>
 
100
<HR>
 
101
<DL>
 
102
<DT><PRE>public class <B>ChunkedOutputStream</B><DT>extends <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/OutputStream.html" title="class or interface in java.io">OutputStream</A></DL>
 
103
</PRE>
 
104
 
 
105
<P>
 
106
Implements HTTP chunking support. Writes are buffered to an internal buffer (2048 default size).
 
107
 Chunks are guaranteed to be at least as large as the buffer size (except for the last chunk).
 
108
<P>
 
109
 
 
110
<P>
 
111
<DL>
 
112
<DT><B>Author:</B></DT>
 
113
  <DD>Mohammad Rezaei, Goldman, Sachs & Co.</DD>
 
114
</DL>
 
115
<HR>
 
116
 
 
117
<P>
 
118
 
 
119
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
 
120
 
 
121
<A NAME="constructor_summary"><!-- --></A>
 
122
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 
123
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 
124
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
 
125
<B>Constructor Summary</B></FONT></TH>
 
126
</TR>
 
127
<TR BGCOLOR="white" CLASS="TableRowColor">
 
128
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/ChunkedOutputStream.html#ChunkedOutputStream(java.io.OutputStream)">ChunkedOutputStream</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/OutputStream.html" title="class or interface in java.io">OutputStream</A>&nbsp;stream)</CODE>
 
129
 
 
130
<BR>
 
131
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Wraps a stream and chunks the output.</TD>
 
132
</TR>
 
133
<TR BGCOLOR="white" CLASS="TableRowColor">
 
134
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/ChunkedOutputStream.html#ChunkedOutputStream(java.io.OutputStream, int)">ChunkedOutputStream</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/OutputStream.html" title="class or interface in java.io">OutputStream</A>&nbsp;stream,
 
135
                    int&nbsp;bufferSize)</CODE>
 
136
 
 
137
<BR>
 
138
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Wraps a stream and chunks the output.</TD>
 
139
</TR>
 
140
</TABLE>
 
141
&nbsp;
 
142
<!-- ========== METHOD SUMMARY =========== -->
 
143
 
 
144
<A NAME="method_summary"><!-- --></A>
 
145
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 
146
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 
147
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
 
148
<B>Method Summary</B></FONT></TH>
 
149
</TR>
 
150
<TR BGCOLOR="white" CLASS="TableRowColor">
 
151
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 
152
<CODE>&nbsp;void</CODE></FONT></TD>
 
153
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/ChunkedOutputStream.html#close()">close</A></B>()</CODE>
 
154
 
 
155
<BR>
 
156
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Finishes writing to the underlying stream, but does NOT close the underlying stream.</TD>
 
157
</TR>
 
158
<TR BGCOLOR="white" CLASS="TableRowColor">
 
159
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 
160
<CODE>&nbsp;void</CODE></FONT></TD>
 
161
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/ChunkedOutputStream.html#finish()">finish</A></B>()</CODE>
 
162
 
 
163
<BR>
 
164
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Must be called to ensure the internal cache is flushed and the closing chunk is written.</TD>
 
165
</TR>
 
166
<TR BGCOLOR="white" CLASS="TableRowColor">
 
167
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 
168
<CODE>&nbsp;void</CODE></FONT></TD>
 
169
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/ChunkedOutputStream.html#flush()">flush</A></B>()</CODE>
 
170
 
 
171
<BR>
 
172
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Flushes the underlying stream, but leaves the internal buffer alone.</TD>
 
173
</TR>
 
174
<TR BGCOLOR="white" CLASS="TableRowColor">
 
175
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 
176
<CODE>protected &nbsp;void</CODE></FONT></TD>
 
177
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/ChunkedOutputStream.html#flushCache()">flushCache</A></B>()</CODE>
 
178
 
 
179
<BR>
 
180
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes the cache out onto the underlying stream</TD>
 
181
</TR>
 
182
<TR BGCOLOR="white" CLASS="TableRowColor">
 
183
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 
184
<CODE>protected &nbsp;void</CODE></FONT></TD>
 
185
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/ChunkedOutputStream.html#flushCacheWithAppend(byte[], int, int)">flushCacheWithAppend</A></B>(byte[]&nbsp;bufferToAppend,
 
186
                     int&nbsp;off,
 
187
                     int&nbsp;len)</CODE>
 
188
 
 
189
<BR>
 
190
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes the cache and bufferToAppend to the underlying stream
 
191
 as one large chunk</TD>
 
192
</TR>
 
193
<TR BGCOLOR="white" CLASS="TableRowColor">
 
194
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 
195
<CODE>&nbsp;void</CODE></FONT></TD>
 
196
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/ChunkedOutputStream.html#write(byte[])">write</A></B>(byte[]&nbsp;b)</CODE>
 
197
 
 
198
<BR>
 
199
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes the array.</TD>
 
200
</TR>
 
201
<TR BGCOLOR="white" CLASS="TableRowColor">
 
202
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 
203
<CODE>&nbsp;void</CODE></FONT></TD>
 
204
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/ChunkedOutputStream.html#write(byte[], int, int)">write</A></B>(byte[]&nbsp;src,
 
205
      int&nbsp;off,
 
206
      int&nbsp;len)</CODE>
 
207
 
 
208
<BR>
 
209
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 
210
</TR>
 
211
<TR BGCOLOR="white" CLASS="TableRowColor">
 
212
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 
213
<CODE>&nbsp;void</CODE></FONT></TD>
 
214
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/ChunkedOutputStream.html#write(int)">write</A></B>(int&nbsp;b)</CODE>
 
215
 
 
216
<BR>
 
217
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Write the specified byte to our output stream.</TD>
 
218
</TR>
 
219
<TR BGCOLOR="white" CLASS="TableRowColor">
 
220
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 
221
<CODE>protected &nbsp;void</CODE></FONT></TD>
 
222
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/ChunkedOutputStream.html#writeClosingChunk()">writeClosingChunk</A></B>()</CODE>
 
223
 
 
224
<BR>
 
225
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 
226
</TR>
 
227
</TABLE>
 
228
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
 
229
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 
230
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
 
231
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TH>
 
232
</TR>
 
233
<TR BGCOLOR="white" CLASS="TableRowColor">
 
234
<TD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
 
235
</TR>
 
236
</TABLE>
 
237
&nbsp;
 
238
<P>
 
239
 
 
240
<!-- ========= CONSTRUCTOR DETAIL ======== -->
 
241
 
 
242
<A NAME="constructor_detail"><!-- --></A>
 
243
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 
244
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 
245
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
 
246
<B>Constructor Detail</B></FONT></TH>
 
247
</TR>
 
248
</TABLE>
 
249
 
 
250
<A NAME="ChunkedOutputStream(java.io.OutputStream, int)"><!-- --></A><H3>
 
251
ChunkedOutputStream</H3>
 
252
<PRE>
 
253
public <B>ChunkedOutputStream</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/OutputStream.html" title="class or interface in java.io">OutputStream</A>&nbsp;stream,
 
254
                           int&nbsp;bufferSize)
 
255
                    throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE>
 
256
<DL>
 
257
<DD>Wraps a stream and chunks the output.
 
258
<P>
 
259
<DL>
 
260
<DT><B>Parameters:</B><DD><CODE>stream</CODE> - to wrap<DD><CODE>bufferSize</CODE> - minimum chunk size (excluding last chunk)
 
261
<DT><B>Throws:</B>
 
262
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE><DT><B>Since:</B></DT>
 
263
  <DD>3.0</DD>
 
264
</DL>
 
265
</DL>
 
266
<HR>
 
267
 
 
268
<A NAME="ChunkedOutputStream(java.io.OutputStream)"><!-- --></A><H3>
 
269
ChunkedOutputStream</H3>
 
270
<PRE>
 
271
public <B>ChunkedOutputStream</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/OutputStream.html" title="class or interface in java.io">OutputStream</A>&nbsp;stream)
 
272
                    throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE>
 
273
<DL>
 
274
<DD>Wraps a stream and chunks the output. The default buffer size of 2048 was chosen because
 
275
 the chunk overhead is less than 0.5%
 
276
<P>
 
277
<DL>
 
278
<DT><B>Parameters:</B><DD><CODE>stream</CODE> - 
 
279
<DT><B>Throws:</B>
 
280
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE></DL>
 
281
</DL>
 
282
 
 
283
<!-- ============ METHOD DETAIL ========== -->
 
284
 
 
285
<A NAME="method_detail"><!-- --></A>
 
286
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 
287
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 
288
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
 
289
<B>Method Detail</B></FONT></TH>
 
290
</TR>
 
291
</TABLE>
 
292
 
 
293
<A NAME="flushCache()"><!-- --></A><H3>
 
294
flushCache</H3>
 
295
<PRE>
 
296
protected void <B>flushCache</B>()
 
297
                   throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE>
 
298
<DL>
 
299
<DD>Writes the cache out onto the underlying stream
 
300
<P>
 
301
<DD><DL>
 
302
 
 
303
<DT><B>Throws:</B>
 
304
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE><DT><B>Since:</B></DT>
 
305
  <DD>3.0</DD>
 
306
</DL>
 
307
</DD>
 
308
</DL>
 
309
<HR>
 
310
 
 
311
<A NAME="flushCacheWithAppend(byte[], int, int)"><!-- --></A><H3>
 
312
flushCacheWithAppend</H3>
 
313
<PRE>
 
314
protected void <B>flushCacheWithAppend</B>(byte[]&nbsp;bufferToAppend,
 
315
                                    int&nbsp;off,
 
316
                                    int&nbsp;len)
 
317
                             throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE>
 
318
<DL>
 
319
<DD>Writes the cache and bufferToAppend to the underlying stream
 
320
 as one large chunk
 
321
<P>
 
322
<DD><DL>
 
323
<DT><B>Parameters:</B><DD><CODE>bufferToAppend</CODE> - <DD><CODE>off</CODE> - <DD><CODE>len</CODE> - 
 
324
<DT><B>Throws:</B>
 
325
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE><DT><B>Since:</B></DT>
 
326
  <DD>3.0</DD>
 
327
</DL>
 
328
</DD>
 
329
</DL>
 
330
<HR>
 
331
 
 
332
<A NAME="writeClosingChunk()"><!-- --></A><H3>
 
333
writeClosingChunk</H3>
 
334
<PRE>
 
335
protected void <B>writeClosingChunk</B>()
 
336
                          throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE>
 
337
<DL>
 
338
<DD><DL>
 
339
 
 
340
<DT><B>Throws:</B>
 
341
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE></DL>
 
342
</DD>
 
343
</DL>
 
344
<HR>
 
345
 
 
346
<A NAME="finish()"><!-- --></A><H3>
 
347
finish</H3>
 
348
<PRE>
 
349
public void <B>finish</B>()
 
350
            throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE>
 
351
<DL>
 
352
<DD>Must be called to ensure the internal cache is flushed and the closing chunk is written.
 
353
<P>
 
354
<DD><DL>
 
355
 
 
356
<DT><B>Throws:</B>
 
357
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE><DT><B>Since:</B></DT>
 
358
  <DD>3.0</DD>
 
359
</DL>
 
360
</DD>
 
361
</DL>
 
362
<HR>
 
363
 
 
364
<A NAME="write(int)"><!-- --></A><H3>
 
365
write</H3>
 
366
<PRE>
 
367
public void <B>write</B>(int&nbsp;b)
 
368
           throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE>
 
369
<DL>
 
370
<DD>Write the specified byte to our output stream.
 
371
 
 
372
 Note: Avoid this method as it will cause an inefficient single byte chunk. 
 
373
 Use write (byte[], int, int) instead.
 
374
<P>
 
375
<DD><DL>
 
376
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/OutputStream.html#write(int)" title="class or interface in java.io">write</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/OutputStream.html" title="class or interface in java.io">OutputStream</A></CODE></DL>
 
377
</DD>
 
378
<DD><DL>
 
379
<DT><B>Parameters:</B><DD><CODE>b</CODE> - The byte to be written
 
380
<DT><B>Throws:</B>
 
381
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - if an input/output error occurs</DL>
 
382
</DD>
 
383
</DL>
 
384
<HR>
 
385
 
 
386
<A NAME="write(byte[])"><!-- --></A><H3>
 
387
write</H3>
 
388
<PRE>
 
389
public void <B>write</B>(byte[]&nbsp;b)
 
390
           throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE>
 
391
<DL>
 
392
<DD>Writes the array. If the array does not fit within the buffer, it is
 
393
 not split, but rather written out as one large chunk.
 
394
<P>
 
395
<DD><DL>
 
396
<DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/OutputStream.html#write(byte[])" title="class or interface in java.io">write</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/OutputStream.html" title="class or interface in java.io">OutputStream</A></CODE></DL>
 
397
</DD>
 
398
<DD><DL>
 
399
<DT><B>Parameters:</B><DD><CODE>b</CODE> - 
 
400
<DT><B>Throws:</B>
 
401
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE><DT><B>Since:</B></DT>
 
402
  <DD>3.0</DD>
 
403
</DL>
 
404
</DD>
 
405
</DL>
 
406
<HR>
 
407
 
 
408
<A NAME="write(byte[], int, int)"><!-- --></A><H3>
 
409
write</H3>
 
410
<PRE>
 
411
public void <B>write</B>(byte[]&nbsp;src,
 
412
                  int&nbsp;off,
 
413
                  int&nbsp;len)
 
414
           throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE>
 
415
<DL>
 
416
<DD><DL>
 
417
<DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/OutputStream.html#write(byte[], int, int)" title="class or interface in java.io">write</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/OutputStream.html" title="class or interface in java.io">OutputStream</A></CODE></DL>
 
418
</DD>
 
419
<DD><DL>
 
420
 
 
421
<DT><B>Throws:</B>
 
422
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE></DL>
 
423
</DD>
 
424
</DL>
 
425
<HR>
 
426
 
 
427
<A NAME="flush()"><!-- --></A><H3>
 
428
flush</H3>
 
429
<PRE>
 
430
public void <B>flush</B>()
 
431
           throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE>
 
432
<DL>
 
433
<DD>Flushes the underlying stream, but leaves the internal buffer alone.
 
434
<P>
 
435
<DD><DL>
 
436
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Flushable.html#flush()" title="class or interface in java.io">flush</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Flushable.html" title="class or interface in java.io">Flushable</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/OutputStream.html#flush()" title="class or interface in java.io">flush</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/OutputStream.html" title="class or interface in java.io">OutputStream</A></CODE></DL>
 
437
</DD>
 
438
<DD><DL>
 
439
 
 
440
<DT><B>Throws:</B>
 
441
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE></DL>
 
442
</DD>
 
443
</DL>
 
444
<HR>
 
445
 
 
446
<A NAME="close()"><!-- --></A><H3>
 
447
close</H3>
 
448
<PRE>
 
449
public void <B>close</B>()
 
450
           throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE>
 
451
<DL>
 
452
<DD>Finishes writing to the underlying stream, but does NOT close the underlying stream.
 
453
<P>
 
454
<DD><DL>
 
455
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Closeable.html#close()" title="class or interface in java.io">close</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Closeable.html" title="class or interface in java.io">Closeable</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/OutputStream.html#close()" title="class or interface in java.io">close</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/OutputStream.html" title="class or interface in java.io">OutputStream</A></CODE></DL>
 
456
</DD>
 
457
<DD><DL>
 
458
 
 
459
<DT><B>Throws:</B>
 
460
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE></DL>
 
461
</DD>
 
462
</DL>
 
463
<!-- ========= END OF CLASS DATA ========= -->
 
464
<HR>
 
465
 
 
466
 
 
467
<!-- ======= START OF BOTTOM NAVBAR ====== -->
 
468
<A NAME="navbar_bottom"><!-- --></A>
 
469
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
 
470
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
 
471
<TR>
 
472
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
 
473
<A NAME="navbar_bottom_firstrow"><!-- --></A>
 
474
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
 
475
  <TR ALIGN="center" VALIGN="top">
 
476
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
 
477
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
 
478
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
 
479
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/ChunkedOutputStream.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
 
480
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
 
481
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
 
482
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
 
483
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
 
484
  </TR>
 
485
</TABLE>
 
486
</TD>
 
487
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
 
488
</EM>
 
489
</TD>
 
490
</TR>
 
491
 
 
492
<TR>
 
493
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 
494
&nbsp;<A HREF="../../../../org/apache/commons/httpclient/ChunkedInputStream.html" title="class in org.apache.commons.httpclient"><B>PREV CLASS</B></A>&nbsp;
 
495
&nbsp;<A HREF="../../../../org/apache/commons/httpclient/CircularRedirectException.html" title="class in org.apache.commons.httpclient"><B>NEXT CLASS</B></A></FONT></TD>
 
496
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 
497
  <A HREF="../../../../index.html?org/apache/commons/httpclient/ChunkedOutputStream.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 
498
&nbsp;<A HREF="ChunkedOutputStream.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
 
499
&nbsp;<SCRIPT type="text/javascript">
 
500
  <!--
 
501
  if(window==top) {
 
502
    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
 
503
  }
 
504
  //-->
 
505
</SCRIPT>
 
506
<NOSCRIPT>
 
507
  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
 
508
</NOSCRIPT>
 
509
 
 
510
 
 
511
</FONT></TD>
 
512
</TR>
 
513
<TR>
 
514
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
 
515
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
 
516
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
 
517
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
 
518
</TR>
 
519
</TABLE>
 
520
<A NAME="skip-navbar_bottom"></A>
 
521
<!-- ======== END OF BOTTOM NAVBAR ======= -->
 
522
 
 
523
<HR>
 
524
Copyright &copy; 2001-2007 Apache Software Foundation. All Rights Reserved.
 
525
</BODY>
 
526
</HTML>