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

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

initial import of LiRK3

File size: 15.9 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<!--NewPage-->
3<HTML>
4<HEAD>
5<!-- Generated by javadoc (build 1.4.2_13) on Mon Oct 01 14:33:14 NZST 2007 -->
6<TITLE>
7DemuxOutputStream (Apache Ant API)
8</TITLE>
9
10<META NAME="keywords" CONTENT="org.apache.tools.ant.DemuxOutputStream class">
11
12<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
13
14<SCRIPT type="text/javascript">
15function windowTitle()
16{
17 parent.document.title="DemuxOutputStream (Apache Ant API)";
18}
19</SCRIPT>
20
21</HEAD>
22
23<BODY BGCOLOR="white" onload="windowTitle();">
24
25
26<!-- ========= START OF TOP NAVBAR ======= -->
27<A NAME="navbar_top"><!-- --></A>
28<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
29<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
30<TR>
31<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
32<A NAME="navbar_top_firstrow"><!-- --></A>
33<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
34 <TR ALIGN="center" VALIGN="top">
35 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
36 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
37 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
38 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
39 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
40 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
42 </TR>
43</TABLE>
44</TD>
45<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
46</EM>
47</TD>
48</TR>
49
50<TR>
51<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
52&nbsp;<A HREF="../../../../org/apache/tools/ant/DemuxInputStream.html" title="class in org.apache.tools.ant"><B>PREV CLASS</B></A>&nbsp;
53&nbsp;<A HREF="../../../../org/apache/tools/ant/Diagnostics.html" title="class in org.apache.tools.ant"><B>NEXT CLASS</B></A></FONT></TD>
54<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
55 <A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A> &nbsp;
56&nbsp;<A HREF="DemuxOutputStream.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
57&nbsp;<SCRIPT type="text/javascript">
58 <!--
59 if(window==top) {
60 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
61 }
62 //-->
63</SCRIPT>
64<NOSCRIPT>
65 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
66</NOSCRIPT>
67
68</FONT></TD>
69</TR>
70<TR>
71<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
72 SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
73<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
74DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
75</TR>
76</TABLE>
77<A NAME="skip-navbar_top"></A>
78<!-- ========= END OF TOP NAVBAR ========= -->
79
80<HR>
81<!-- ======== START OF CLASS DATA ======== -->
82<H2>
83<FONT SIZE="-1">
84org.apache.tools.ant</FONT>
85<BR>
86Class DemuxOutputStream</H2>
87<PRE>
88java.lang.Object
89 <IMG SRC="../../../../resources/inherit.gif" ALT="extended by">java.io.OutputStream
90 <IMG SRC="../../../../resources/inherit.gif" ALT="extended by"><B>org.apache.tools.ant.DemuxOutputStream</B>
91</PRE>
92<HR>
93<DL>
94<DT>public class <B>DemuxOutputStream</B><DT>extends java.io.OutputStream</DL>
95
96<P>
97Logs content written by a thread and forwards the buffers onto the
98 project object which will forward the content to the appropriate
99 task.
100<P>
101
102<P>
103<DL>
104<DT><B>Since:</B></DT>
105 <DD>1.4</DD>
106</DL>
107<HR>
108
109<P>
110<!-- ======== NESTED CLASS SUMMARY ======== -->
111
112
113<!-- =========== FIELD SUMMARY =========== -->
114
115
116<!-- ======== CONSTRUCTOR SUMMARY ======== -->
117
118<A NAME="constructor_summary"><!-- --></A>
119<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
120<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
121<TD COLSPAN=2><FONT SIZE="+2">
122<B>Constructor Summary</B></FONT></TD>
123</TR>
124<TR BGCOLOR="white" CLASS="TableRowColor">
125<TD><CODE><B><A HREF="../../../../org/apache/tools/ant/DemuxOutputStream.html#DemuxOutputStream(org.apache.tools.ant.Project, boolean)">DemuxOutputStream</A></B>(<A HREF="../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</A>&nbsp;project,
126 boolean&nbsp;isErrorStream)</CODE>
127
128<BR>
129&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new instance of this class.</TD>
130</TR>
131</TABLE>
132&nbsp;
133<!-- ========== METHOD SUMMARY =========== -->
134
135<A NAME="method_summary"><!-- --></A>
136<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
137<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
138<TD COLSPAN=2><FONT SIZE="+2">
139<B>Method Summary</B></FONT></TD>
140</TR>
141<TR BGCOLOR="white" CLASS="TableRowColor">
142<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
143<CODE>&nbsp;void</CODE></FONT></TD>
144<TD><CODE><B><A HREF="../../../../org/apache/tools/ant/DemuxOutputStream.html#close()">close</A></B>()</CODE>
145
146<BR>
147&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Equivalent to flushing the stream.</TD>
148</TR>
149<TR BGCOLOR="white" CLASS="TableRowColor">
150<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
151<CODE>&nbsp;void</CODE></FONT></TD>
152<TD><CODE><B><A HREF="../../../../org/apache/tools/ant/DemuxOutputStream.html#flush()">flush</A></B>()</CODE>
153
154<BR>
155&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes all remaining data in the buffer associated
156 with the current thread to the project.</TD>
157</TR>
158<TR BGCOLOR="white" CLASS="TableRowColor">
159<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
160<CODE>protected &nbsp;void</CODE></FONT></TD>
161<TD><CODE><B><A HREF="../../../../org/apache/tools/ant/DemuxOutputStream.html#processBuffer(java.io.ByteArrayOutputStream)">processBuffer</A></B>(java.io.ByteArrayOutputStream&nbsp;buffer)</CODE>
162
163<BR>
164&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Converts the buffer to a string and sends it to the project.</TD>
165</TR>
166<TR BGCOLOR="white" CLASS="TableRowColor">
167<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
168<CODE>protected &nbsp;void</CODE></FONT></TD>
169<TD><CODE><B><A HREF="../../../../org/apache/tools/ant/DemuxOutputStream.html#processFlush(java.io.ByteArrayOutputStream)">processFlush</A></B>(java.io.ByteArrayOutputStream&nbsp;buffer)</CODE>
170
171<BR>
172&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Converts the buffer to a string and sends it to the project.</TD>
173</TR>
174<TR BGCOLOR="white" CLASS="TableRowColor">
175<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
176<CODE>&nbsp;void</CODE></FONT></TD>
177<TD><CODE><B><A HREF="../../../../org/apache/tools/ant/DemuxOutputStream.html#write(byte[], int, int)">write</A></B>(byte[]&nbsp;b,
178 int&nbsp;off,
179 int&nbsp;len)</CODE>
180
181<BR>
182&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Write a block of characters to the output stream</TD>
183</TR>
184<TR BGCOLOR="white" CLASS="TableRowColor">
185<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
186<CODE>&nbsp;void</CODE></FONT></TD>
187<TD><CODE><B><A HREF="../../../../org/apache/tools/ant/DemuxOutputStream.html#write(int)">write</A></B>(int&nbsp;cc)</CODE>
188
189<BR>
190&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes the data to the buffer and flushes the buffer if a line
191 separator is detected or if the buffer has reached its maximum size.</TD>
192</TR>
193</TABLE>
194&nbsp;<A NAME="methods_inherited_from_class_java.io.OutputStream"><!-- --></A>
195<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
196<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
197<TD><B>Methods inherited from class java.io.OutputStream</B></TD>
198</TR>
199<TR BGCOLOR="white" CLASS="TableRowColor">
200<TD><CODE>write</CODE></TD>
201</TR>
202</TABLE>
203&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
204<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
205<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
206<TD><B>Methods inherited from class java.lang.Object</B></TD>
207</TR>
208<TR BGCOLOR="white" CLASS="TableRowColor">
209<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
210</TR>
211</TABLE>
212&nbsp;
213<P>
214
215<!-- ============ FIELD DETAIL =========== -->
216
217
218<!-- ========= CONSTRUCTOR DETAIL ======== -->
219
220<A NAME="constructor_detail"><!-- --></A>
221<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
222<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
223<TD COLSPAN=1><FONT SIZE="+2">
224<B>Constructor Detail</B></FONT></TD>
225</TR>
226</TABLE>
227
228<A NAME="DemuxOutputStream(org.apache.tools.ant.Project, boolean)"><!-- --></A><H3>
229DemuxOutputStream</H3>
230<PRE>
231public <B>DemuxOutputStream</B>(<A HREF="../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</A>&nbsp;project,
232 boolean&nbsp;isErrorStream)</PRE>
233<DL>
234<DD>Creates a new instance of this class.
235<P>
236<DT><B>Parameters:</B><DD><CODE>project</CODE> - The project instance for which output is being
237 demultiplexed. Must not be <code>null</code>.<DD><CODE>isErrorStream</CODE> - <code>true</code> if this is the error string,
238 otherwise a normal output stream. This is
239 passed to the project so it knows
240 which stream it is receiving.</DL>
241
242<!-- ============ METHOD DETAIL ========== -->
243
244<A NAME="method_detail"><!-- --></A>
245<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
246<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
247<TD COLSPAN=1><FONT SIZE="+2">
248<B>Method Detail</B></FONT></TD>
249</TR>
250</TABLE>
251
252<A NAME="write(int)"><!-- --></A><H3>
253write</H3>
254<PRE>
255public void <B>write</B>(int&nbsp;cc)
256 throws java.io.IOException</PRE>
257<DL>
258<DD>Writes the data to the buffer and flushes the buffer if a line
259 separator is detected or if the buffer has reached its maximum size.
260<P>
261<DD><DL>
262<DT><B>Parameters:</B><DD><CODE>cc</CODE> - data to log (byte).
263<DT><B>Throws:</B>
264<DD><CODE>java.io.IOException</CODE> - if the data cannot be written to the stream</DL>
265</DD>
266</DL>
267<HR>
268
269<A NAME="processBuffer(java.io.ByteArrayOutputStream)"><!-- --></A><H3>
270processBuffer</H3>
271<PRE>
272protected void <B>processBuffer</B>(java.io.ByteArrayOutputStream&nbsp;buffer)</PRE>
273<DL>
274<DD>Converts the buffer to a string and sends it to the project.
275<P>
276<DD><DL>
277<DT><B>Parameters:</B><DD><CODE>buffer</CODE> - the ByteArrayOutputStream used to collect the output
278 until a line separator is seen.<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/tools/ant/Project.html#demuxOutput(java.lang.String, boolean)"><CODE>Project.demuxOutput(String,boolean)</CODE></A></DL>
279</DD>
280</DL>
281<HR>
282
283<A NAME="processFlush(java.io.ByteArrayOutputStream)"><!-- --></A><H3>
284processFlush</H3>
285<PRE>
286protected void <B>processFlush</B>(java.io.ByteArrayOutputStream&nbsp;buffer)</PRE>
287<DL>
288<DD>Converts the buffer to a string and sends it to the project.
289<P>
290<DD><DL>
291<DT><B>Parameters:</B><DD><CODE>buffer</CODE> - the ByteArrayOutputStream used to collect the output
292 until a line separator is seen.<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/tools/ant/Project.html#demuxOutput(java.lang.String, boolean)"><CODE>Project.demuxOutput(String,boolean)</CODE></A></DL>
293</DD>
294</DL>
295<HR>
296
297<A NAME="close()"><!-- --></A><H3>
298close</H3>
299<PRE>
300public void <B>close</B>()
301 throws java.io.IOException</PRE>
302<DL>
303<DD>Equivalent to flushing the stream.
304<P>
305<DD><DL>
306
307<DT><B>Throws:</B>
308<DD><CODE>java.io.IOException</CODE> - if there is a problem closing the stream.<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/tools/ant/DemuxOutputStream.html#flush()"><CODE>flush()</CODE></A></DL>
309</DD>
310</DL>
311<HR>
312
313<A NAME="flush()"><!-- --></A><H3>
314flush</H3>
315<PRE>
316public void <B>flush</B>()
317 throws java.io.IOException</PRE>
318<DL>
319<DD>Writes all remaining data in the buffer associated
320 with the current thread to the project.
321<P>
322<DD><DL>
323
324<DT><B>Throws:</B>
325<DD><CODE>java.io.IOException</CODE> - if there is a problem flushing the stream.</DL>
326</DD>
327</DL>
328<HR>
329
330<A NAME="write(byte[], int, int)"><!-- --></A><H3>
331write</H3>
332<PRE>
333public void <B>write</B>(byte[]&nbsp;b,
334 int&nbsp;off,
335 int&nbsp;len)
336 throws java.io.IOException</PRE>
337<DL>
338<DD>Write a block of characters to the output stream
339<P>
340<DD><DL>
341<DT><B>Parameters:</B><DD><CODE>b</CODE> - the array containing the data<DD><CODE>off</CODE> - the offset into the array where data starts<DD><CODE>len</CODE> - the length of block
342<DT><B>Throws:</B>
343<DD><CODE>java.io.IOException</CODE> - if the data cannot be written into the stream.</DL>
344</DD>
345</DL>
346<!-- ========= END OF CLASS DATA ========= -->
347<HR>
348
349
350<!-- ======= START OF BOTTOM NAVBAR ====== -->
351<A NAME="navbar_bottom"><!-- --></A>
352<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
353<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
354<TR>
355<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
356<A NAME="navbar_bottom_firstrow"><!-- --></A>
357<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
358 <TR ALIGN="center" VALIGN="top">
359 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
360 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
361 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
362 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
363 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
364 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
365 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
366 </TR>
367</TABLE>
368</TD>
369<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
370</EM>
371</TD>
372</TR>
373
374<TR>
375<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
376&nbsp;<A HREF="../../../../org/apache/tools/ant/DemuxInputStream.html" title="class in org.apache.tools.ant"><B>PREV CLASS</B></A>&nbsp;
377&nbsp;<A HREF="../../../../org/apache/tools/ant/Diagnostics.html" title="class in org.apache.tools.ant"><B>NEXT CLASS</B></A></FONT></TD>
378<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
379 <A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A> &nbsp;
380&nbsp;<A HREF="DemuxOutputStream.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
381&nbsp;<SCRIPT type="text/javascript">
382 <!--
383 if(window==top) {
384 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
385 }
386 //-->
387</SCRIPT>
388<NOSCRIPT>
389 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
390</NOSCRIPT>
391
392</FONT></TD>
393</TR>
394<TR>
395<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
396 SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
397<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
398DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
399</TR>
400</TABLE>
401<A NAME="skip-navbar_bottom"></A>
402<!-- ======== END OF BOTTOM NAVBAR ======= -->
403
404<HR>
405Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.
406</BODY>
407</HTML>
Note: See TracBrowser for help on using the repository browser.