PageRenderTime 27ms CodeModel.GetById 9ms app.highlight 14ms RepoModel.GetById 0ms app.codeStats 0ms

/apache-log4j-1.2.17/site/apidocs/org/apache/log4j/pattern/FormattingInfo.html

#
HTML | 362 lines | 297 code | 43 blank | 22 comment | 0 complexity | 0212939aefd588327a73685155355307 MD5 | raw file
Possible License(s): Apache-2.0
  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_23) -->
  6<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
  7<TITLE>
  8FormattingInfo (Apache Log4j 1.2.17 API)
  9</TITLE>
 10
 11<META NAME="date" CONTENT="2012-05-06">
 12
 13<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
 14
 15<SCRIPT type="text/javascript">
 16function windowTitle()
 17{
 18    if (location.href.indexOf('is-external=true') == -1) {
 19        parent.document.title="FormattingInfo (Apache Log4j 1.2.17 API)";
 20    }
 21}
 22</SCRIPT>
 23<NOSCRIPT>
 24</NOSCRIPT>
 25
 26</HEAD>
 27
 28<BODY BGCOLOR="white" onload="windowTitle();">
 29<HR>
 30
 31
 32<!-- ========= START OF TOP NAVBAR ======= -->
 33<A NAME="navbar_top"><!-- --></A>
 34<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
 35<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
 36<TR>
 37<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
 38<A NAME="navbar_top_firstrow"><!-- --></A>
 39<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
 40  <TR ALIGN="center" VALIGN="top">
 41  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
 42  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
 43  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
 44  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/FormattingInfo.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
 45  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
 46  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
 47  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
 48  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
 49  </TR>
 50</TABLE>
 51</TD>
 52<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
 53</EM>
 54</TD>
 55</TR>
 56
 57<TR>
 58<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 59&nbsp;<A HREF="../../../../org/apache/log4j/pattern/FileLocationPatternConverter.html" title="class in org.apache.log4j.pattern"><B>PREV CLASS</B></A>&nbsp;
 60&nbsp;<A HREF="../../../../org/apache/log4j/pattern/FullLocationPatternConverter.html" title="class in org.apache.log4j.pattern"><B>NEXT CLASS</B></A></FONT></TD>
 61<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 62  <A HREF="../../../../index.html?org/apache/log4j/pattern/FormattingInfo.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 63&nbsp;<A HREF="FormattingInfo.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
 64&nbsp;<SCRIPT type="text/javascript">
 65  <!--
 66  if(window==top) {
 67    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
 68  }
 69  //-->
 70</SCRIPT>
 71<NOSCRIPT>
 72  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
 73</NOSCRIPT>
 74
 75
 76</FONT></TD>
 77</TR>
 78<TR>
 79<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
 80  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
 81<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
 82DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
 83</TR>
 84</TABLE>
 85<A NAME="skip-navbar_top"></A>
 86<!-- ========= END OF TOP NAVBAR ========= -->
 87
 88<HR>
 89<!-- ======== START OF CLASS DATA ======== -->
 90<H2>
 91<FONT SIZE="-1">
 92org.apache.log4j.pattern</FONT>
 93<BR>
 94Class FormattingInfo</H2>
 95<PRE>
 96<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
 97  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.log4j.pattern.FormattingInfo</B>
 98</PRE>
 99<HR>
100<DL>
101<DT><PRE>public final class <B>FormattingInfo</B><DT>extends <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL>
102</PRE>
103
104<P>
105Modifies the output of a pattern converter for a specified minimum
106 and maximum width and alignment.
107<P>
108
109<P>
110<DL>
111<DT><B>Author:</B></DT>
112  <DD><a href=mailto:jim_cakalic@na.biomerieux.com>Jim Cakalic</a>, Ceki G&uuml;lc&uuml;, Curt Arnold</DD>
113</DL>
114<HR>
115
116<P>
117
118<!-- ======== CONSTRUCTOR SUMMARY ======== -->
119
120<A NAME="constructor_summary"><!-- --></A>
121<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
122<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
123<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
124<B>Constructor Summary</B></FONT></TH>
125</TR>
126<TR BGCOLOR="white" CLASS="TableRowColor">
127<TD><CODE><B><A HREF="../../../../org/apache/log4j/pattern/FormattingInfo.html#FormattingInfo(boolean, int, int)">FormattingInfo</A></B>(boolean&nbsp;leftAlign,
128               int&nbsp;minLength,
129               int&nbsp;maxLength)</CODE>
130
131<BR>
132&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates new instance.</TD>
133</TR>
134</TABLE>
135&nbsp;
136<!-- ========== METHOD SUMMARY =========== -->
137
138<A NAME="method_summary"><!-- --></A>
139<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
140<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
141<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
142<B>Method Summary</B></FONT></TH>
143</TR>
144<TR BGCOLOR="white" CLASS="TableRowColor">
145<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
146<CODE>&nbsp;void</CODE></FONT></TD>
147<TD><CODE><B><A HREF="../../../../org/apache/log4j/pattern/FormattingInfo.html#format(int, java.lang.StringBuffer)">format</A></B>(int&nbsp;fieldStart,
148       <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/StringBuffer.html?is-external=true" title="class or interface in java.lang">StringBuffer</A>&nbsp;buffer)</CODE>
149
150<BR>
151&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adjust the content of the buffer based on the specified lengths and alignment.</TD>
152</TR>
153<TR BGCOLOR="white" CLASS="TableRowColor">
154<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
155<CODE>static&nbsp;<A HREF="../../../../org/apache/log4j/pattern/FormattingInfo.html" title="class in org.apache.log4j.pattern">FormattingInfo</A></CODE></FONT></TD>
156<TD><CODE><B><A HREF="../../../../org/apache/log4j/pattern/FormattingInfo.html#getDefault()">getDefault</A></B>()</CODE>
157
158<BR>
159&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets default instance.</TD>
160</TR>
161<TR BGCOLOR="white" CLASS="TableRowColor">
162<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
163<CODE>&nbsp;int</CODE></FONT></TD>
164<TD><CODE><B><A HREF="../../../../org/apache/log4j/pattern/FormattingInfo.html#getMaxLength()">getMaxLength</A></B>()</CODE>
165
166<BR>
167&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get maximum length.</TD>
168</TR>
169<TR BGCOLOR="white" CLASS="TableRowColor">
170<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
171<CODE>&nbsp;int</CODE></FONT></TD>
172<TD><CODE><B><A HREF="../../../../org/apache/log4j/pattern/FormattingInfo.html#getMinLength()">getMinLength</A></B>()</CODE>
173
174<BR>
175&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get minimum length.</TD>
176</TR>
177<TR BGCOLOR="white" CLASS="TableRowColor">
178<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
179<CODE>&nbsp;boolean</CODE></FONT></TD>
180<TD><CODE><B><A HREF="../../../../org/apache/log4j/pattern/FormattingInfo.html#isLeftAligned()">isLeftAligned</A></B>()</CODE>
181
182<BR>
183&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determine if left aligned.</TD>
184</TR>
185</TABLE>
186&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
187<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
188<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
189<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?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
190</TR>
191<TR BGCOLOR="white" CLASS="TableRowColor">
192<TD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/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/j2se/1.4.2/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/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4.2/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/j2se/1.4.2/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/j2se/1.4.2/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/j2se/1.4.2/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/j2se/1.4.2/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/j2se/1.4.2/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/j2se/1.4.2/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/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
193</TR>
194</TABLE>
195&nbsp;
196<P>
197
198<!-- ========= CONSTRUCTOR DETAIL ======== -->
199
200<A NAME="constructor_detail"><!-- --></A>
201<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
202<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
203<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
204<B>Constructor Detail</B></FONT></TH>
205</TR>
206</TABLE>
207
208<A NAME="FormattingInfo(boolean, int, int)"><!-- --></A><H3>
209FormattingInfo</H3>
210<PRE>
211public <B>FormattingInfo</B>(boolean&nbsp;leftAlign,
212                      int&nbsp;minLength,
213                      int&nbsp;maxLength)</PRE>
214<DL>
215<DD>Creates new instance.
216<P>
217<DL>
218<DT><B>Parameters:</B><DD><CODE>leftAlign</CODE> - left align if true.<DD><CODE>minLength</CODE> - minimum length.<DD><CODE>maxLength</CODE> - maximum length.</DL>
219</DL>
220
221<!-- ============ METHOD DETAIL ========== -->
222
223<A NAME="method_detail"><!-- --></A>
224<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
225<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
226<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
227<B>Method Detail</B></FONT></TH>
228</TR>
229</TABLE>
230
231<A NAME="getDefault()"><!-- --></A><H3>
232getDefault</H3>
233<PRE>
234public static <A HREF="../../../../org/apache/log4j/pattern/FormattingInfo.html" title="class in org.apache.log4j.pattern">FormattingInfo</A> <B>getDefault</B>()</PRE>
235<DL>
236<DD>Gets default instance.
237<P>
238<DD><DL>
239
240<DT><B>Returns:</B><DD>default instance.</DL>
241</DD>
242</DL>
243<HR>
244
245<A NAME="isLeftAligned()"><!-- --></A><H3>
246isLeftAligned</H3>
247<PRE>
248public boolean <B>isLeftAligned</B>()</PRE>
249<DL>
250<DD>Determine if left aligned.
251<P>
252<DD><DL>
253
254<DT><B>Returns:</B><DD>true if left aligned.</DL>
255</DD>
256</DL>
257<HR>
258
259<A NAME="getMinLength()"><!-- --></A><H3>
260getMinLength</H3>
261<PRE>
262public int <B>getMinLength</B>()</PRE>
263<DL>
264<DD>Get minimum length.
265<P>
266<DD><DL>
267
268<DT><B>Returns:</B><DD>minimum length.</DL>
269</DD>
270</DL>
271<HR>
272
273<A NAME="getMaxLength()"><!-- --></A><H3>
274getMaxLength</H3>
275<PRE>
276public int <B>getMaxLength</B>()</PRE>
277<DL>
278<DD>Get maximum length.
279<P>
280<DD><DL>
281
282<DT><B>Returns:</B><DD>maximum length.</DL>
283</DD>
284</DL>
285<HR>
286
287<A NAME="format(int, java.lang.StringBuffer)"><!-- --></A><H3>
288format</H3>
289<PRE>
290public void <B>format</B>(int&nbsp;fieldStart,
291                   <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/StringBuffer.html?is-external=true" title="class or interface in java.lang">StringBuffer</A>&nbsp;buffer)</PRE>
292<DL>
293<DD>Adjust the content of the buffer based on the specified lengths and alignment.
294<P>
295<DD><DL>
296<DT><B>Parameters:</B><DD><CODE>fieldStart</CODE> - start of field in buffer.<DD><CODE>buffer</CODE> - buffer to be modified.</DL>
297</DD>
298</DL>
299<!-- ========= END OF CLASS DATA ========= -->
300<HR>
301
302
303<!-- ======= START OF BOTTOM NAVBAR ====== -->
304<A NAME="navbar_bottom"><!-- --></A>
305<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
306<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
307<TR>
308<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
309<A NAME="navbar_bottom_firstrow"><!-- --></A>
310<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
311  <TR ALIGN="center" VALIGN="top">
312  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
313  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
314  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
315  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/FormattingInfo.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
316  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
317  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
318  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
319  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
320  </TR>
321</TABLE>
322</TD>
323<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
324</EM>
325</TD>
326</TR>
327
328<TR>
329<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
330&nbsp;<A HREF="../../../../org/apache/log4j/pattern/FileLocationPatternConverter.html" title="class in org.apache.log4j.pattern"><B>PREV CLASS</B></A>&nbsp;
331&nbsp;<A HREF="../../../../org/apache/log4j/pattern/FullLocationPatternConverter.html" title="class in org.apache.log4j.pattern"><B>NEXT CLASS</B></A></FONT></TD>
332<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
333  <A HREF="../../../../index.html?org/apache/log4j/pattern/FormattingInfo.html" target="_top"><B>FRAMES</B></A>  &nbsp;
334&nbsp;<A HREF="FormattingInfo.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
335&nbsp;<SCRIPT type="text/javascript">
336  <!--
337  if(window==top) {
338    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
339  }
340  //-->
341</SCRIPT>
342<NOSCRIPT>
343  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
344</NOSCRIPT>
345
346
347</FONT></TD>
348</TR>
349<TR>
350<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
351  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
352<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
353DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
354</TR>
355</TABLE>
356<A NAME="skip-navbar_bottom"></A>
357<!-- ======== END OF BOTTOM NAVBAR ======= -->
358
359<HR>
360Copyright &#169; 1999-2012 <a href="http://www.apache.org">Apache Software Foundation</a>. All Rights Reserved.
361</BODY>
362</HTML>