source: proiecte/HadoopJUnit/hadoop-0.20.1/docs/api/org/apache/hadoop/util/UTF8ByteArrayUtils.html @ 120

Last change on this file since 120 was 120, checked in by (none), 14 years ago

Added the mail files for the Hadoop JUNit Project

  • Property svn:executable set to *
File size: 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.6.0_07) on Tue Sep 01 20:56:55 UTC 2009 -->
6<TITLE>
7UTF8ByteArrayUtils (Hadoop 0.20.1 API)
8</TITLE>
9
10<META NAME="date" CONTENT="2009-09-01">
11
12<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
13
14<SCRIPT type="text/javascript">
15function windowTitle()
16{
17    if (location.href.indexOf('is-external=true') == -1) {
18        parent.document.title="UTF8ByteArrayUtils (Hadoop 0.20.1 API)";
19    }
20}
21</SCRIPT>
22<NOSCRIPT>
23</NOSCRIPT>
24
25</HEAD>
26
27<BODY BGCOLOR="white" onload="windowTitle();">
28<HR>
29
30
31<!-- ========= START OF TOP NAVBAR ======= -->
32<A NAME="navbar_top"><!-- --></A>
33<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
34<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
35<TR>
36<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
37<A NAME="navbar_top_firstrow"><!-- --></A>
38<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
39  <TR ALIGN="center" VALIGN="top">
40  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
41  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
42  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
43  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/UTF8ByteArrayUtils.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
44  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
45  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
46  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
47  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
48  </TR>
49</TABLE>
50</TD>
51<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
52</EM>
53</TD>
54</TR>
55
56<TR>
57<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
58&nbsp;<A HREF="../../../../org/apache/hadoop/util/ToolRunner.html" title="class in org.apache.hadoop.util"><B>PREV CLASS</B></A>&nbsp;
59&nbsp;<A HREF="../../../../org/apache/hadoop/util/VersionInfo.html" title="class in org.apache.hadoop.util"><B>NEXT CLASS</B></A></FONT></TD>
60<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
61  <A HREF="../../../../index.html?org/apache/hadoop/util/UTF8ByteArrayUtils.html" target="_top"><B>FRAMES</B></A>  &nbsp;
62&nbsp;<A HREF="UTF8ByteArrayUtils.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
63&nbsp;<SCRIPT type="text/javascript">
64  <!--
65  if(window==top) {
66    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
67  }
68  //-->
69</SCRIPT>
70<NOSCRIPT>
71  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
72</NOSCRIPT>
73
74
75</FONT></TD>
76</TR>
77<TR>
78<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
79  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
80<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
81DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
82</TR>
83</TABLE>
84<A NAME="skip-navbar_top"></A>
85<!-- ========= END OF TOP NAVBAR ========= -->
86
87<HR>
88<!-- ======== START OF CLASS DATA ======== -->
89<H2>
90<FONT SIZE="-1">
91org.apache.hadoop.util</FONT>
92<BR>
93Class UTF8ByteArrayUtils</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 "><B>org.apache.hadoop.util.UTF8ByteArrayUtils</B>
97</PRE>
98<HR>
99<DL>
100<DT><PRE>public class <B>UTF8ByteArrayUtils</B><DT>extends <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></DL>
101</PRE>
102
103<P>
104<HR>
105
106<P>
107
108<!-- ======== CONSTRUCTOR SUMMARY ======== -->
109
110<A NAME="constructor_summary"><!-- --></A>
111<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
112<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
113<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
114<B>Constructor Summary</B></FONT></TH>
115</TR>
116<TR BGCOLOR="white" CLASS="TableRowColor">
117<TD><CODE><B><A HREF="../../../../org/apache/hadoop/util/UTF8ByteArrayUtils.html#UTF8ByteArrayUtils()">UTF8ByteArrayUtils</A></B>()</CODE>
118
119<BR>
120&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
121</TR>
122</TABLE>
123&nbsp;
124<!-- ========== METHOD SUMMARY =========== -->
125
126<A NAME="method_summary"><!-- --></A>
127<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
128<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
129<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
130<B>Method Summary</B></FONT></TH>
131</TR>
132<TR BGCOLOR="white" CLASS="TableRowColor">
133<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
134<CODE>static&nbsp;int</CODE></FONT></TD>
135<TD><CODE><B><A HREF="../../../../org/apache/hadoop/util/UTF8ByteArrayUtils.html#findByte(byte[], int, int, byte)">findByte</A></B>(byte[]&nbsp;utf,
136         int&nbsp;start,
137         int&nbsp;end,
138         byte&nbsp;b)</CODE>
139
140<BR>
141&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Find the first occurrence of the given byte b in a UTF-8 encoded string</TD>
142</TR>
143<TR BGCOLOR="white" CLASS="TableRowColor">
144<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
145<CODE>static&nbsp;int</CODE></FONT></TD>
146<TD><CODE><B><A HREF="../../../../org/apache/hadoop/util/UTF8ByteArrayUtils.html#findBytes(byte[], int, int, byte[])">findBytes</A></B>(byte[]&nbsp;utf,
147          int&nbsp;start,
148          int&nbsp;end,
149          byte[]&nbsp;b)</CODE>
150
151<BR>
152&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Find the first occurrence of the given bytes b in a UTF-8 encoded string</TD>
153</TR>
154<TR BGCOLOR="white" CLASS="TableRowColor">
155<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
156<CODE>static&nbsp;int</CODE></FONT></TD>
157<TD><CODE><B><A HREF="../../../../org/apache/hadoop/util/UTF8ByteArrayUtils.html#findNthByte(byte[], byte, int)">findNthByte</A></B>(byte[]&nbsp;utf,
158            byte&nbsp;b,
159            int&nbsp;n)</CODE>
160
161<BR>
162&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Find the nth occurrence of the given byte b in a UTF-8 encoded string</TD>
163</TR>
164<TR BGCOLOR="white" CLASS="TableRowColor">
165<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
166<CODE>static&nbsp;int</CODE></FONT></TD>
167<TD><CODE><B><A HREF="../../../../org/apache/hadoop/util/UTF8ByteArrayUtils.html#findNthByte(byte[], int, int, byte, int)">findNthByte</A></B>(byte[]&nbsp;utf,
168            int&nbsp;start,
169            int&nbsp;length,
170            byte&nbsp;b,
171            int&nbsp;n)</CODE>
172
173<BR>
174&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Find the nth occurrence of the given byte b in a UTF-8 encoded string</TD>
175</TR>
176</TABLE>
177&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
178<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
179<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
180<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>
181</TR>
182<TR BGCOLOR="white" CLASS="TableRowColor">
183<TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
184</TR>
185</TABLE>
186&nbsp;
187<P>
188
189<!-- ========= CONSTRUCTOR DETAIL ======== -->
190
191<A NAME="constructor_detail"><!-- --></A>
192<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
193<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
194<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
195<B>Constructor Detail</B></FONT></TH>
196</TR>
197</TABLE>
198
199<A NAME="UTF8ByteArrayUtils()"><!-- --></A><H3>
200UTF8ByteArrayUtils</H3>
201<PRE>
202public <B>UTF8ByteArrayUtils</B>()</PRE>
203<DL>
204</DL>
205
206<!-- ============ METHOD DETAIL ========== -->
207
208<A NAME="method_detail"><!-- --></A>
209<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
210<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
211<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
212<B>Method Detail</B></FONT></TH>
213</TR>
214</TABLE>
215
216<A NAME="findByte(byte[], int, int, byte)"><!-- --></A><H3>
217findByte</H3>
218<PRE>
219public static int <B>findByte</B>(byte[]&nbsp;utf,
220                           int&nbsp;start,
221                           int&nbsp;end,
222                           byte&nbsp;b)</PRE>
223<DL>
224<DD>Find the first occurrence of the given byte b in a UTF-8 encoded string
225<P>
226<DD><DL>
227<DT><B>Parameters:</B><DD><CODE>utf</CODE> - a byte array containing a UTF-8 encoded string<DD><CODE>start</CODE> - starting offset<DD><CODE>end</CODE> - ending position<DD><CODE>b</CODE> - the byte to find
228<DT><B>Returns:</B><DD>position that first byte occures otherwise -1</DL>
229</DD>
230</DL>
231<HR>
232
233<A NAME="findBytes(byte[], int, int, byte[])"><!-- --></A><H3>
234findBytes</H3>
235<PRE>
236public static int <B>findBytes</B>(byte[]&nbsp;utf,
237                            int&nbsp;start,
238                            int&nbsp;end,
239                            byte[]&nbsp;b)</PRE>
240<DL>
241<DD>Find the first occurrence of the given bytes b in a UTF-8 encoded string
242<P>
243<DD><DL>
244<DT><B>Parameters:</B><DD><CODE>utf</CODE> - a byte array containing a UTF-8 encoded string<DD><CODE>start</CODE> - starting offset<DD><CODE>end</CODE> - ending position<DD><CODE>b</CODE> - the bytes to find
245<DT><B>Returns:</B><DD>position that first byte occures otherwise -1</DL>
246</DD>
247</DL>
248<HR>
249
250<A NAME="findNthByte(byte[], int, int, byte, int)"><!-- --></A><H3>
251findNthByte</H3>
252<PRE>
253public static int <B>findNthByte</B>(byte[]&nbsp;utf,
254                              int&nbsp;start,
255                              int&nbsp;length,
256                              byte&nbsp;b,
257                              int&nbsp;n)</PRE>
258<DL>
259<DD>Find the nth occurrence of the given byte b in a UTF-8 encoded string
260<P>
261<DD><DL>
262<DT><B>Parameters:</B><DD><CODE>utf</CODE> - a byte array containing a UTF-8 encoded string<DD><CODE>start</CODE> - starting offset<DD><CODE>length</CODE> - the length of byte array<DD><CODE>b</CODE> - the byte to find<DD><CODE>n</CODE> - the desired occurrence of the given byte
263<DT><B>Returns:</B><DD>position that nth occurrence of the given byte if exists; otherwise -1</DL>
264</DD>
265</DL>
266<HR>
267
268<A NAME="findNthByte(byte[], byte, int)"><!-- --></A><H3>
269findNthByte</H3>
270<PRE>
271public static int <B>findNthByte</B>(byte[]&nbsp;utf,
272                              byte&nbsp;b,
273                              int&nbsp;n)</PRE>
274<DL>
275<DD>Find the nth occurrence of the given byte b in a UTF-8 encoded string
276<P>
277<DD><DL>
278<DT><B>Parameters:</B><DD><CODE>utf</CODE> - a byte array containing a UTF-8 encoded string<DD><CODE>b</CODE> - the byte to find<DD><CODE>n</CODE> - the desired occurrence of the given byte
279<DT><B>Returns:</B><DD>position that nth occurrence of the given byte if exists; otherwise -1</DL>
280</DD>
281</DL>
282<!-- ========= END OF CLASS DATA ========= -->
283<HR>
284
285
286<!-- ======= START OF BOTTOM NAVBAR ====== -->
287<A NAME="navbar_bottom"><!-- --></A>
288<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
289<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
290<TR>
291<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
292<A NAME="navbar_bottom_firstrow"><!-- --></A>
293<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
294  <TR ALIGN="center" VALIGN="top">
295  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
296  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
297  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
298  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/UTF8ByteArrayUtils.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
299  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
300  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
301  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
302  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
303  </TR>
304</TABLE>
305</TD>
306<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
307</EM>
308</TD>
309</TR>
310
311<TR>
312<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
313&nbsp;<A HREF="../../../../org/apache/hadoop/util/ToolRunner.html" title="class in org.apache.hadoop.util"><B>PREV CLASS</B></A>&nbsp;
314&nbsp;<A HREF="../../../../org/apache/hadoop/util/VersionInfo.html" title="class in org.apache.hadoop.util"><B>NEXT CLASS</B></A></FONT></TD>
315<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
316  <A HREF="../../../../index.html?org/apache/hadoop/util/UTF8ByteArrayUtils.html" target="_top"><B>FRAMES</B></A>  &nbsp;
317&nbsp;<A HREF="UTF8ByteArrayUtils.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
318&nbsp;<SCRIPT type="text/javascript">
319  <!--
320  if(window==top) {
321    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
322  }
323  //-->
324</SCRIPT>
325<NOSCRIPT>
326  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
327</NOSCRIPT>
328
329
330</FONT></TD>
331</TR>
332<TR>
333<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
334  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
335<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
336DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
337</TR>
338</TABLE>
339<A NAME="skip-navbar_bottom"></A>
340<!-- ======== END OF BOTTOM NAVBAR ======= -->
341
342<HR>
343Copyright &copy; 2009 The Apache Software Foundation
344</BODY>
345</HTML>
Note: See TracBrowser for help on using the repository browser.