[120] | 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 | Text (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="Text (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/Text.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/Stringifier.html" title="interface in org.apache.hadoop.io"><B>PREV CLASS</B></A> |
---|
| 59 | <A HREF="../../../../org/apache/hadoop/io/Text.Comparator.html" title="class in org.apache.hadoop.io"><B>NEXT CLASS</B></A></FONT></TD> |
---|
| 60 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
---|
| 61 | <A HREF="../../../../index.html?org/apache/hadoop/io/Text.html" target="_top"><B>FRAMES</B></A> |
---|
| 62 | <A HREF="Text.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: <A HREF="#nested_class_summary">NESTED</A> | FIELD | <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: FIELD | <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</FONT> |
---|
| 92 | <BR> |
---|
| 93 | Class Text</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="../../../../org/apache/hadoop/io/BinaryComparable.html" title="class in org.apache.hadoop.io">org.apache.hadoop.io.BinaryComparable</A> |
---|
| 97 | <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.hadoop.io.Text</B> |
---|
| 98 | </PRE> |
---|
| 99 | <DL> |
---|
| 100 | <DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</A><<A HREF="../../../../org/apache/hadoop/io/BinaryComparable.html" title="class in org.apache.hadoop.io">BinaryComparable</A>>, <A HREF="../../../../org/apache/hadoop/io/Writable.html" title="interface in org.apache.hadoop.io">Writable</A>, <A HREF="../../../../org/apache/hadoop/io/WritableComparable.html" title="interface in org.apache.hadoop.io">WritableComparable</A><<A HREF="../../../../org/apache/hadoop/io/BinaryComparable.html" title="class in org.apache.hadoop.io">BinaryComparable</A>></DD> |
---|
| 101 | </DL> |
---|
| 102 | <HR> |
---|
| 103 | <DL> |
---|
| 104 | <DT><PRE>public class <B>Text</B><DT>extends <A HREF="../../../../org/apache/hadoop/io/BinaryComparable.html" title="class in org.apache.hadoop.io">BinaryComparable</A><DT>implements <A HREF="../../../../org/apache/hadoop/io/WritableComparable.html" title="interface in org.apache.hadoop.io">WritableComparable</A><<A HREF="../../../../org/apache/hadoop/io/BinaryComparable.html" title="class in org.apache.hadoop.io">BinaryComparable</A>></DL> |
---|
| 105 | </PRE> |
---|
| 106 | |
---|
| 107 | <P> |
---|
| 108 | This class stores text using standard UTF8 encoding. It provides methods |
---|
| 109 | to serialize, deserialize, and compare texts at byte level. The type of |
---|
| 110 | length is integer and is serialized using zero-compressed format. <p>In |
---|
| 111 | addition, it provides methods for string traversal without converting the |
---|
| 112 | byte array to a string. <p>Also includes utilities for |
---|
| 113 | serializing/deserialing a string, coding/decoding a string, checking if a |
---|
| 114 | byte array contains valid UTF8 code, calculating the length of an encoded |
---|
| 115 | string. |
---|
| 116 | <P> |
---|
| 117 | |
---|
| 118 | <P> |
---|
| 119 | <HR> |
---|
| 120 | |
---|
| 121 | <P> |
---|
| 122 | <!-- ======== NESTED CLASS SUMMARY ======== --> |
---|
| 123 | |
---|
| 124 | <A NAME="nested_class_summary"><!-- --></A> |
---|
| 125 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
| 126 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
| 127 | <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
---|
| 128 | <B>Nested Class Summary</B></FONT></TH> |
---|
| 129 | </TR> |
---|
| 130 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 131 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 132 | <CODE>static class</CODE></FONT></TD> |
---|
| 133 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/Text.Comparator.html" title="class in org.apache.hadoop.io">Text.Comparator</A></B></CODE> |
---|
| 134 | |
---|
| 135 | <BR> |
---|
| 136 | A WritableComparator optimized for Text keys.</TD> |
---|
| 137 | </TR> |
---|
| 138 | </TABLE> |
---|
| 139 | |
---|
| 140 | <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
---|
| 141 | |
---|
| 142 | <A NAME="constructor_summary"><!-- --></A> |
---|
| 143 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
| 144 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
| 145 | <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
---|
| 146 | <B>Constructor Summary</B></FONT></TH> |
---|
| 147 | </TR> |
---|
| 148 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 149 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/Text.html#Text()">Text</A></B>()</CODE> |
---|
| 150 | |
---|
| 151 | <BR> |
---|
| 152 | </TD> |
---|
| 153 | </TR> |
---|
| 154 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 155 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/Text.html#Text(byte[])">Text</A></B>(byte[] utf8)</CODE> |
---|
| 156 | |
---|
| 157 | <BR> |
---|
| 158 | Construct from a byte array.</TD> |
---|
| 159 | </TR> |
---|
| 160 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 161 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/Text.html#Text(java.lang.String)">Text</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> string)</CODE> |
---|
| 162 | |
---|
| 163 | <BR> |
---|
| 164 | Construct from a string.</TD> |
---|
| 165 | </TR> |
---|
| 166 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 167 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/Text.html#Text(org.apache.hadoop.io.Text)">Text</A></B>(<A HREF="../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</A> utf8)</CODE> |
---|
| 168 | |
---|
| 169 | <BR> |
---|
| 170 | Construct from another text.</TD> |
---|
| 171 | </TR> |
---|
| 172 | </TABLE> |
---|
| 173 | |
---|
| 174 | <!-- ========== METHOD SUMMARY =========== --> |
---|
| 175 | |
---|
| 176 | <A NAME="method_summary"><!-- --></A> |
---|
| 177 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
| 178 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
| 179 | <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
---|
| 180 | <B>Method Summary</B></FONT></TH> |
---|
| 181 | </TR> |
---|
| 182 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 183 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 184 | <CODE> void</CODE></FONT></TD> |
---|
| 185 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/Text.html#append(byte[], int, int)">append</A></B>(byte[] utf8, |
---|
| 186 | int start, |
---|
| 187 | int len)</CODE> |
---|
| 188 | |
---|
| 189 | <BR> |
---|
| 190 | Append a range of bytes to the end of the given text</TD> |
---|
| 191 | </TR> |
---|
| 192 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 193 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 194 | <CODE>static int</CODE></FONT></TD> |
---|
| 195 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/Text.html#bytesToCodePoint(java.nio.ByteBuffer)">bytesToCodePoint</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</A> bytes)</CODE> |
---|
| 196 | |
---|
| 197 | <BR> |
---|
| 198 | Returns the next code point at the current position in |
---|
| 199 | the buffer.</TD> |
---|
| 200 | </TR> |
---|
| 201 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 202 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 203 | <CODE> int</CODE></FONT></TD> |
---|
| 204 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/Text.html#charAt(int)">charAt</A></B>(int position)</CODE> |
---|
| 205 | |
---|
| 206 | <BR> |
---|
| 207 | Returns the Unicode Scalar Value (32-bit integer value) |
---|
| 208 | for the character at <code>position</code>.</TD> |
---|
| 209 | </TR> |
---|
| 210 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 211 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 212 | <CODE> void</CODE></FONT></TD> |
---|
| 213 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/Text.html#clear()">clear</A></B>()</CODE> |
---|
| 214 | |
---|
| 215 | <BR> |
---|
| 216 | Clear the string to empty.</TD> |
---|
| 217 | </TR> |
---|
| 218 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 219 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 220 | <CODE>static <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> |
---|
| 221 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/Text.html#decode(byte[])">decode</A></B>(byte[] utf8)</CODE> |
---|
| 222 | |
---|
| 223 | <BR> |
---|
| 224 | Converts the provided byte array to a String using the |
---|
| 225 | UTF-8 encoding.</TD> |
---|
| 226 | </TR> |
---|
| 227 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 228 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 229 | <CODE>static <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> |
---|
| 230 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/Text.html#decode(byte[], int, int)">decode</A></B>(byte[] utf8, |
---|
| 231 | int start, |
---|
| 232 | int length)</CODE> |
---|
| 233 | |
---|
| 234 | <BR> |
---|
| 235 | </TD> |
---|
| 236 | </TR> |
---|
| 237 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 238 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 239 | <CODE>static <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> |
---|
| 240 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/Text.html#decode(byte[], int, int, boolean)">decode</A></B>(byte[] utf8, |
---|
| 241 | int start, |
---|
| 242 | int length, |
---|
| 243 | boolean replace)</CODE> |
---|
| 244 | |
---|
| 245 | <BR> |
---|
| 246 | Converts the provided byte array to a String using the |
---|
| 247 | UTF-8 encoding.</TD> |
---|
| 248 | </TR> |
---|
| 249 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 250 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 251 | <CODE>static <A HREF="http://java.sun.com/javase/6/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</A></CODE></FONT></TD> |
---|
| 252 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/Text.html#encode(java.lang.String)">encode</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> string)</CODE> |
---|
| 253 | |
---|
| 254 | <BR> |
---|
| 255 | Converts the provided String to bytes using the |
---|
| 256 | UTF-8 encoding.</TD> |
---|
| 257 | </TR> |
---|
| 258 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 259 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 260 | <CODE>static <A HREF="http://java.sun.com/javase/6/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</A></CODE></FONT></TD> |
---|
| 261 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/Text.html#encode(java.lang.String, boolean)">encode</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> string, |
---|
| 262 | boolean replace)</CODE> |
---|
| 263 | |
---|
| 264 | <BR> |
---|
| 265 | Converts the provided String to bytes using the |
---|
| 266 | UTF-8 encoding.</TD> |
---|
| 267 | </TR> |
---|
| 268 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 269 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 270 | <CODE> boolean</CODE></FONT></TD> |
---|
| 271 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/Text.html#equals(java.lang.Object)">equals</A></B>(<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> o)</CODE> |
---|
| 272 | |
---|
| 273 | <BR> |
---|
| 274 | Returns true iff <code>o</code> is a Text with the same contents.</TD> |
---|
| 275 | </TR> |
---|
| 276 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 277 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 278 | <CODE> int</CODE></FONT></TD> |
---|
| 279 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/Text.html#find(java.lang.String)">find</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> what)</CODE> |
---|
| 280 | |
---|
| 281 | <BR> |
---|
| 282 | </TD> |
---|
| 283 | </TR> |
---|
| 284 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 285 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 286 | <CODE> int</CODE></FONT></TD> |
---|
| 287 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/Text.html#find(java.lang.String, int)">find</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> what, |
---|
| 288 | int start)</CODE> |
---|
| 289 | |
---|
| 290 | <BR> |
---|
| 291 | Finds any occurence of <code>what</code> in the backing |
---|
| 292 | buffer, starting as position <code>start</code>.</TD> |
---|
| 293 | </TR> |
---|
| 294 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 295 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 296 | <CODE> byte[]</CODE></FONT></TD> |
---|
| 297 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/Text.html#getBytes()">getBytes</A></B>()</CODE> |
---|
| 298 | |
---|
| 299 | <BR> |
---|
| 300 | Returns the raw bytes; however, only data up to <A HREF="../../../../org/apache/hadoop/io/Text.html#getLength()"><CODE>getLength()</CODE></A> is |
---|
| 301 | valid.</TD> |
---|
| 302 | </TR> |
---|
| 303 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 304 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 305 | <CODE> int</CODE></FONT></TD> |
---|
| 306 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/Text.html#getLength()">getLength</A></B>()</CODE> |
---|
| 307 | |
---|
| 308 | <BR> |
---|
| 309 | Returns the number of bytes in the byte array</TD> |
---|
| 310 | </TR> |
---|
| 311 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 312 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 313 | <CODE> int</CODE></FONT></TD> |
---|
| 314 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/Text.html#hashCode()">hashCode</A></B>()</CODE> |
---|
| 315 | |
---|
| 316 | <BR> |
---|
| 317 | Return a hash of the bytes returned from {#getBytes()}.</TD> |
---|
| 318 | </TR> |
---|
| 319 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 320 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 321 | <CODE> void</CODE></FONT></TD> |
---|
| 322 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/Text.html#readFields(java.io.DataInput)">readFields</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataInput.html?is-external=true" title="class or interface in java.io">DataInput</A> in)</CODE> |
---|
| 323 | |
---|
| 324 | <BR> |
---|
| 325 | deserialize</TD> |
---|
| 326 | </TR> |
---|
| 327 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 328 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 329 | <CODE>static <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> |
---|
| 330 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/Text.html#readString(java.io.DataInput)">readString</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataInput.html?is-external=true" title="class or interface in java.io">DataInput</A> in)</CODE> |
---|
| 331 | |
---|
| 332 | <BR> |
---|
| 333 | Read a UTF8 encoded string from in</TD> |
---|
| 334 | </TR> |
---|
| 335 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 336 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 337 | <CODE> void</CODE></FONT></TD> |
---|
| 338 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/Text.html#set(byte[])">set</A></B>(byte[] utf8)</CODE> |
---|
| 339 | |
---|
| 340 | <BR> |
---|
| 341 | Set to a utf8 byte array</TD> |
---|
| 342 | </TR> |
---|
| 343 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 344 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 345 | <CODE> void</CODE></FONT></TD> |
---|
| 346 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/Text.html#set(byte[], int, int)">set</A></B>(byte[] utf8, |
---|
| 347 | int start, |
---|
| 348 | int len)</CODE> |
---|
| 349 | |
---|
| 350 | <BR> |
---|
| 351 | Set the Text to range of bytes</TD> |
---|
| 352 | </TR> |
---|
| 353 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 354 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 355 | <CODE> void</CODE></FONT></TD> |
---|
| 356 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/Text.html#set(java.lang.String)">set</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> string)</CODE> |
---|
| 357 | |
---|
| 358 | <BR> |
---|
| 359 | Set to contain the contents of a string.</TD> |
---|
| 360 | </TR> |
---|
| 361 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 362 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 363 | <CODE> void</CODE></FONT></TD> |
---|
| 364 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/Text.html#set(org.apache.hadoop.io.Text)">set</A></B>(<A HREF="../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</A> other)</CODE> |
---|
| 365 | |
---|
| 366 | <BR> |
---|
| 367 | copy a text.</TD> |
---|
| 368 | </TR> |
---|
| 369 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 370 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 371 | <CODE>static void</CODE></FONT></TD> |
---|
| 372 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/Text.html#skip(java.io.DataInput)">skip</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataInput.html?is-external=true" title="class or interface in java.io">DataInput</A> in)</CODE> |
---|
| 373 | |
---|
| 374 | <BR> |
---|
| 375 | Skips over one Text in the input.</TD> |
---|
| 376 | </TR> |
---|
| 377 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 378 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 379 | <CODE> <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> |
---|
| 380 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/Text.html#toString()">toString</A></B>()</CODE> |
---|
| 381 | |
---|
| 382 | <BR> |
---|
| 383 | Convert text back to string</TD> |
---|
| 384 | </TR> |
---|
| 385 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 386 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 387 | <CODE>static int</CODE></FONT></TD> |
---|
| 388 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/Text.html#utf8Length(java.lang.String)">utf8Length</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> string)</CODE> |
---|
| 389 | |
---|
| 390 | <BR> |
---|
| 391 | For the given string, returns the number of UTF-8 bytes |
---|
| 392 | required to encode the string.</TD> |
---|
| 393 | </TR> |
---|
| 394 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 395 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 396 | <CODE>static void</CODE></FONT></TD> |
---|
| 397 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/Text.html#validateUTF8(byte[])">validateUTF8</A></B>(byte[] utf8)</CODE> |
---|
| 398 | |
---|
| 399 | <BR> |
---|
| 400 | Check if a byte array contains valid utf-8</TD> |
---|
| 401 | </TR> |
---|
| 402 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 403 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 404 | <CODE>static void</CODE></FONT></TD> |
---|
| 405 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/Text.html#validateUTF8(byte[], int, int)">validateUTF8</A></B>(byte[] utf8, |
---|
| 406 | int start, |
---|
| 407 | int len)</CODE> |
---|
| 408 | |
---|
| 409 | <BR> |
---|
| 410 | Check to see if a byte array is valid utf-8</TD> |
---|
| 411 | </TR> |
---|
| 412 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 413 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 414 | <CODE> void</CODE></FONT></TD> |
---|
| 415 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/Text.html#write(java.io.DataOutput)">write</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io">DataOutput</A> out)</CODE> |
---|
| 416 | |
---|
| 417 | <BR> |
---|
| 418 | serialize |
---|
| 419 | write this object to out |
---|
| 420 | length uses zero-compressed encoding</TD> |
---|
| 421 | </TR> |
---|
| 422 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 423 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 424 | <CODE>static int</CODE></FONT></TD> |
---|
| 425 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/Text.html#writeString(java.io.DataOutput, java.lang.String)">writeString</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io">DataOutput</A> out, |
---|
| 426 | <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> s)</CODE> |
---|
| 427 | |
---|
| 428 | <BR> |
---|
| 429 | Write a UTF8 encoded string to out</TD> |
---|
| 430 | </TR> |
---|
| 431 | </TABLE> |
---|
| 432 | <A NAME="methods_inherited_from_class_org.apache.hadoop.io.BinaryComparable"><!-- --></A> |
---|
| 433 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
| 434 | <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
---|
| 435 | <TH ALIGN="left"><B>Methods inherited from class org.apache.hadoop.io.<A HREF="../../../../org/apache/hadoop/io/BinaryComparable.html" title="class in org.apache.hadoop.io">BinaryComparable</A></B></TH> |
---|
| 436 | </TR> |
---|
| 437 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 438 | <TD><CODE><A HREF="../../../../org/apache/hadoop/io/BinaryComparable.html#compareTo(org.apache.hadoop.io.BinaryComparable)">compareTo</A>, <A HREF="../../../../org/apache/hadoop/io/BinaryComparable.html#compareTo(byte[], int, int)">compareTo</A></CODE></TD> |
---|
| 439 | </TR> |
---|
| 440 | </TABLE> |
---|
| 441 | <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> |
---|
| 442 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
| 443 | <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
---|
| 444 | <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> |
---|
| 445 | </TR> |
---|
| 446 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 447 | <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#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#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#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> |
---|
| 448 | </TR> |
---|
| 449 | </TABLE> |
---|
| 450 | <A NAME="methods_inherited_from_class_java.lang.Comparable"><!-- --></A> |
---|
| 451 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
| 452 | <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
---|
| 453 | <TH ALIGN="left"><B>Methods inherited from interface java.lang.<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</A></B></TH> |
---|
| 454 | </TR> |
---|
| 455 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 456 | <TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Comparable.html?is-external=true#compareTo(T)" title="class or interface in java.lang">compareTo</A></CODE></TD> |
---|
| 457 | </TR> |
---|
| 458 | </TABLE> |
---|
| 459 | |
---|
| 460 | <P> |
---|
| 461 | |
---|
| 462 | <!-- ========= CONSTRUCTOR DETAIL ======== --> |
---|
| 463 | |
---|
| 464 | <A NAME="constructor_detail"><!-- --></A> |
---|
| 465 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
| 466 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
| 467 | <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
---|
| 468 | <B>Constructor Detail</B></FONT></TH> |
---|
| 469 | </TR> |
---|
| 470 | </TABLE> |
---|
| 471 | |
---|
| 472 | <A NAME="Text()"><!-- --></A><H3> |
---|
| 473 | Text</H3> |
---|
| 474 | <PRE> |
---|
| 475 | public <B>Text</B>()</PRE> |
---|
| 476 | <DL> |
---|
| 477 | </DL> |
---|
| 478 | <HR> |
---|
| 479 | |
---|
| 480 | <A NAME="Text(java.lang.String)"><!-- --></A><H3> |
---|
| 481 | Text</H3> |
---|
| 482 | <PRE> |
---|
| 483 | public <B>Text</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> string)</PRE> |
---|
| 484 | <DL> |
---|
| 485 | <DD>Construct from a string. |
---|
| 486 | <P> |
---|
| 487 | </DL> |
---|
| 488 | <HR> |
---|
| 489 | |
---|
| 490 | <A NAME="Text(org.apache.hadoop.io.Text)"><!-- --></A><H3> |
---|
| 491 | Text</H3> |
---|
| 492 | <PRE> |
---|
| 493 | public <B>Text</B>(<A HREF="../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</A> utf8)</PRE> |
---|
| 494 | <DL> |
---|
| 495 | <DD>Construct from another text. |
---|
| 496 | <P> |
---|
| 497 | </DL> |
---|
| 498 | <HR> |
---|
| 499 | |
---|
| 500 | <A NAME="Text(byte[])"><!-- --></A><H3> |
---|
| 501 | Text</H3> |
---|
| 502 | <PRE> |
---|
| 503 | public <B>Text</B>(byte[] utf8)</PRE> |
---|
| 504 | <DL> |
---|
| 505 | <DD>Construct from a byte array. |
---|
| 506 | <P> |
---|
| 507 | </DL> |
---|
| 508 | |
---|
| 509 | <!-- ============ METHOD DETAIL ========== --> |
---|
| 510 | |
---|
| 511 | <A NAME="method_detail"><!-- --></A> |
---|
| 512 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
| 513 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
| 514 | <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
---|
| 515 | <B>Method Detail</B></FONT></TH> |
---|
| 516 | </TR> |
---|
| 517 | </TABLE> |
---|
| 518 | |
---|
| 519 | <A NAME="getBytes()"><!-- --></A><H3> |
---|
| 520 | getBytes</H3> |
---|
| 521 | <PRE> |
---|
| 522 | public byte[] <B>getBytes</B>()</PRE> |
---|
| 523 | <DL> |
---|
| 524 | <DD>Returns the raw bytes; however, only data up to <A HREF="../../../../org/apache/hadoop/io/Text.html#getLength()"><CODE>getLength()</CODE></A> is |
---|
| 525 | valid. |
---|
| 526 | <P> |
---|
| 527 | <DD><DL> |
---|
| 528 | <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/hadoop/io/BinaryComparable.html#getBytes()">getBytes</A></CODE> in class <CODE><A HREF="../../../../org/apache/hadoop/io/BinaryComparable.html" title="class in org.apache.hadoop.io">BinaryComparable</A></CODE></DL> |
---|
| 529 | </DD> |
---|
| 530 | <DD><DL> |
---|
| 531 | </DL> |
---|
| 532 | </DD> |
---|
| 533 | </DL> |
---|
| 534 | <HR> |
---|
| 535 | |
---|
| 536 | <A NAME="getLength()"><!-- --></A><H3> |
---|
| 537 | getLength</H3> |
---|
| 538 | <PRE> |
---|
| 539 | public int <B>getLength</B>()</PRE> |
---|
| 540 | <DL> |
---|
| 541 | <DD>Returns the number of bytes in the byte array |
---|
| 542 | <P> |
---|
| 543 | <DD><DL> |
---|
| 544 | <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/hadoop/io/BinaryComparable.html#getLength()">getLength</A></CODE> in class <CODE><A HREF="../../../../org/apache/hadoop/io/BinaryComparable.html" title="class in org.apache.hadoop.io">BinaryComparable</A></CODE></DL> |
---|
| 545 | </DD> |
---|
| 546 | <DD><DL> |
---|
| 547 | </DL> |
---|
| 548 | </DD> |
---|
| 549 | </DL> |
---|
| 550 | <HR> |
---|
| 551 | |
---|
| 552 | <A NAME="charAt(int)"><!-- --></A><H3> |
---|
| 553 | charAt</H3> |
---|
| 554 | <PRE> |
---|
| 555 | public int <B>charAt</B>(int position)</PRE> |
---|
| 556 | <DL> |
---|
| 557 | <DD>Returns the Unicode Scalar Value (32-bit integer value) |
---|
| 558 | for the character at <code>position</code>. Note that this |
---|
| 559 | method avoids using the converter or doing String instatiation |
---|
| 560 | <P> |
---|
| 561 | <DD><DL> |
---|
| 562 | </DL> |
---|
| 563 | </DD> |
---|
| 564 | <DD><DL> |
---|
| 565 | |
---|
| 566 | <DT><B>Returns:</B><DD>the Unicode scalar value at position or -1 |
---|
| 567 | if the position is invalid or points to a |
---|
| 568 | trailing byte</DL> |
---|
| 569 | </DD> |
---|
| 570 | </DL> |
---|
| 571 | <HR> |
---|
| 572 | |
---|
| 573 | <A NAME="find(java.lang.String)"><!-- --></A><H3> |
---|
| 574 | find</H3> |
---|
| 575 | <PRE> |
---|
| 576 | public int <B>find</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> what)</PRE> |
---|
| 577 | <DL> |
---|
| 578 | <DD><DL> |
---|
| 579 | </DL> |
---|
| 580 | </DD> |
---|
| 581 | <DD><DL> |
---|
| 582 | </DL> |
---|
| 583 | </DD> |
---|
| 584 | </DL> |
---|
| 585 | <HR> |
---|
| 586 | |
---|
| 587 | <A NAME="find(java.lang.String, int)"><!-- --></A><H3> |
---|
| 588 | find</H3> |
---|
| 589 | <PRE> |
---|
| 590 | public int <B>find</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> what, |
---|
| 591 | int start)</PRE> |
---|
| 592 | <DL> |
---|
| 593 | <DD>Finds any occurence of <code>what</code> in the backing |
---|
| 594 | buffer, starting as position <code>start</code>. The starting |
---|
| 595 | position is measured in bytes and the return value is in |
---|
| 596 | terms of byte position in the buffer. The backing buffer is |
---|
| 597 | not converted to a string for this operation. |
---|
| 598 | <P> |
---|
| 599 | <DD><DL> |
---|
| 600 | </DL> |
---|
| 601 | </DD> |
---|
| 602 | <DD><DL> |
---|
| 603 | |
---|
| 604 | <DT><B>Returns:</B><DD>byte position of the first occurence of the search |
---|
| 605 | string in the UTF-8 buffer or -1 if not found</DL> |
---|
| 606 | </DD> |
---|
| 607 | </DL> |
---|
| 608 | <HR> |
---|
| 609 | |
---|
| 610 | <A NAME="set(java.lang.String)"><!-- --></A><H3> |
---|
| 611 | set</H3> |
---|
| 612 | <PRE> |
---|
| 613 | public void <B>set</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> string)</PRE> |
---|
| 614 | <DL> |
---|
| 615 | <DD>Set to contain the contents of a string. |
---|
| 616 | <P> |
---|
| 617 | <DD><DL> |
---|
| 618 | </DL> |
---|
| 619 | </DD> |
---|
| 620 | <DD><DL> |
---|
| 621 | </DL> |
---|
| 622 | </DD> |
---|
| 623 | </DL> |
---|
| 624 | <HR> |
---|
| 625 | |
---|
| 626 | <A NAME="set(byte[])"><!-- --></A><H3> |
---|
| 627 | set</H3> |
---|
| 628 | <PRE> |
---|
| 629 | public void <B>set</B>(byte[] utf8)</PRE> |
---|
| 630 | <DL> |
---|
| 631 | <DD>Set to a utf8 byte array |
---|
| 632 | <P> |
---|
| 633 | <DD><DL> |
---|
| 634 | </DL> |
---|
| 635 | </DD> |
---|
| 636 | <DD><DL> |
---|
| 637 | </DL> |
---|
| 638 | </DD> |
---|
| 639 | </DL> |
---|
| 640 | <HR> |
---|
| 641 | |
---|
| 642 | <A NAME="set(org.apache.hadoop.io.Text)"><!-- --></A><H3> |
---|
| 643 | set</H3> |
---|
| 644 | <PRE> |
---|
| 645 | public void <B>set</B>(<A HREF="../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</A> other)</PRE> |
---|
| 646 | <DL> |
---|
| 647 | <DD>copy a text. |
---|
| 648 | <P> |
---|
| 649 | <DD><DL> |
---|
| 650 | </DL> |
---|
| 651 | </DD> |
---|
| 652 | <DD><DL> |
---|
| 653 | </DL> |
---|
| 654 | </DD> |
---|
| 655 | </DL> |
---|
| 656 | <HR> |
---|
| 657 | |
---|
| 658 | <A NAME="set(byte[], int, int)"><!-- --></A><H3> |
---|
| 659 | set</H3> |
---|
| 660 | <PRE> |
---|
| 661 | public void <B>set</B>(byte[] utf8, |
---|
| 662 | int start, |
---|
| 663 | int len)</PRE> |
---|
| 664 | <DL> |
---|
| 665 | <DD>Set the Text to range of bytes |
---|
| 666 | <P> |
---|
| 667 | <DD><DL> |
---|
| 668 | </DL> |
---|
| 669 | </DD> |
---|
| 670 | <DD><DL> |
---|
| 671 | <DT><B>Parameters:</B><DD><CODE>utf8</CODE> - the data to copy from<DD><CODE>start</CODE> - the first position of the new string<DD><CODE>len</CODE> - the number of bytes of the new string</DL> |
---|
| 672 | </DD> |
---|
| 673 | </DL> |
---|
| 674 | <HR> |
---|
| 675 | |
---|
| 676 | <A NAME="append(byte[], int, int)"><!-- --></A><H3> |
---|
| 677 | append</H3> |
---|
| 678 | <PRE> |
---|
| 679 | public void <B>append</B>(byte[] utf8, |
---|
| 680 | int start, |
---|
| 681 | int len)</PRE> |
---|
| 682 | <DL> |
---|
| 683 | <DD>Append a range of bytes to the end of the given text |
---|
| 684 | <P> |
---|
| 685 | <DD><DL> |
---|
| 686 | </DL> |
---|
| 687 | </DD> |
---|
| 688 | <DD><DL> |
---|
| 689 | <DT><B>Parameters:</B><DD><CODE>utf8</CODE> - the data to copy from<DD><CODE>start</CODE> - the first position to append from utf8<DD><CODE>len</CODE> - the number of bytes to append</DL> |
---|
| 690 | </DD> |
---|
| 691 | </DL> |
---|
| 692 | <HR> |
---|
| 693 | |
---|
| 694 | <A NAME="clear()"><!-- --></A><H3> |
---|
| 695 | clear</H3> |
---|
| 696 | <PRE> |
---|
| 697 | public void <B>clear</B>()</PRE> |
---|
| 698 | <DL> |
---|
| 699 | <DD>Clear the string to empty. |
---|
| 700 | <P> |
---|
| 701 | <DD><DL> |
---|
| 702 | </DL> |
---|
| 703 | </DD> |
---|
| 704 | <DD><DL> |
---|
| 705 | </DL> |
---|
| 706 | </DD> |
---|
| 707 | </DL> |
---|
| 708 | <HR> |
---|
| 709 | |
---|
| 710 | <A NAME="toString()"><!-- --></A><H3> |
---|
| 711 | toString</H3> |
---|
| 712 | <PRE> |
---|
| 713 | public <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>toString</B>()</PRE> |
---|
| 714 | <DL> |
---|
| 715 | <DD>Convert text back to string |
---|
| 716 | <P> |
---|
| 717 | <DD><DL> |
---|
| 718 | <DT><B>Overrides:</B><DD><CODE><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></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> |
---|
| 719 | </DD> |
---|
| 720 | <DD><DL> |
---|
| 721 | <DT><B>See Also:</B><DD><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"><CODE>Object.toString()</CODE></A></DL> |
---|
| 722 | </DD> |
---|
| 723 | </DL> |
---|
| 724 | <HR> |
---|
| 725 | |
---|
| 726 | <A NAME="readFields(java.io.DataInput)"><!-- --></A><H3> |
---|
| 727 | readFields</H3> |
---|
| 728 | <PRE> |
---|
| 729 | public void <B>readFields</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataInput.html?is-external=true" title="class or interface in java.io">DataInput</A> in) |
---|
| 730 | 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> |
---|
| 731 | <DL> |
---|
| 732 | <DD>deserialize |
---|
| 733 | <P> |
---|
| 734 | <DD><DL> |
---|
| 735 | <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/hadoop/io/Writable.html#readFields(java.io.DataInput)">readFields</A></CODE> in interface <CODE><A HREF="../../../../org/apache/hadoop/io/Writable.html" title="interface in org.apache.hadoop.io">Writable</A></CODE></DL> |
---|
| 736 | </DD> |
---|
| 737 | <DD><DL> |
---|
| 738 | <DT><B>Parameters:</B><DD><CODE>in</CODE> - <code>DataInput</code> to deseriablize this object from. |
---|
| 739 | <DT><B>Throws:</B> |
---|
| 740 | <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> |
---|
| 741 | </DD> |
---|
| 742 | </DL> |
---|
| 743 | <HR> |
---|
| 744 | |
---|
| 745 | <A NAME="skip(java.io.DataInput)"><!-- --></A><H3> |
---|
| 746 | skip</H3> |
---|
| 747 | <PRE> |
---|
| 748 | public static void <B>skip</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataInput.html?is-external=true" title="class or interface in java.io">DataInput</A> in) |
---|
| 749 | 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> |
---|
| 750 | <DL> |
---|
| 751 | <DD>Skips over one Text in the input. |
---|
| 752 | <P> |
---|
| 753 | <DD><DL> |
---|
| 754 | </DL> |
---|
| 755 | </DD> |
---|
| 756 | <DD><DL> |
---|
| 757 | |
---|
| 758 | <DT><B>Throws:</B> |
---|
| 759 | <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> |
---|
| 760 | </DD> |
---|
| 761 | </DL> |
---|
| 762 | <HR> |
---|
| 763 | |
---|
| 764 | <A NAME="write(java.io.DataOutput)"><!-- --></A><H3> |
---|
| 765 | write</H3> |
---|
| 766 | <PRE> |
---|
| 767 | public void <B>write</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io">DataOutput</A> out) |
---|
| 768 | 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> |
---|
| 769 | <DL> |
---|
| 770 | <DD>serialize |
---|
| 771 | write this object to out |
---|
| 772 | length uses zero-compressed encoding |
---|
| 773 | <P> |
---|
| 774 | <DD><DL> |
---|
| 775 | <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/hadoop/io/Writable.html#write(java.io.DataOutput)">write</A></CODE> in interface <CODE><A HREF="../../../../org/apache/hadoop/io/Writable.html" title="interface in org.apache.hadoop.io">Writable</A></CODE></DL> |
---|
| 776 | </DD> |
---|
| 777 | <DD><DL> |
---|
| 778 | <DT><B>Parameters:</B><DD><CODE>out</CODE> - <code>DataOuput</code> to serialize this object into. |
---|
| 779 | <DT><B>Throws:</B> |
---|
| 780 | <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><DT><B>See Also:</B><DD><A HREF="../../../../org/apache/hadoop/io/Writable.html#write(java.io.DataOutput)"><CODE>Writable.write(DataOutput)</CODE></A></DL> |
---|
| 781 | </DD> |
---|
| 782 | </DL> |
---|
| 783 | <HR> |
---|
| 784 | |
---|
| 785 | <A NAME="equals(java.lang.Object)"><!-- --></A><H3> |
---|
| 786 | equals</H3> |
---|
| 787 | <PRE> |
---|
| 788 | public boolean <B>equals</B>(<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> o)</PRE> |
---|
| 789 | <DL> |
---|
| 790 | <DD>Returns true iff <code>o</code> is a Text with the same contents. |
---|
| 791 | <P> |
---|
| 792 | <DD><DL> |
---|
| 793 | <DT><B>Overrides:</B><DD><CODE><A HREF="../../../../org/apache/hadoop/io/BinaryComparable.html#equals(java.lang.Object)">equals</A></CODE> in class <CODE><A HREF="../../../../org/apache/hadoop/io/BinaryComparable.html" title="class in org.apache.hadoop.io">BinaryComparable</A></CODE></DL> |
---|
| 794 | </DD> |
---|
| 795 | <DD><DL> |
---|
| 796 | </DL> |
---|
| 797 | </DD> |
---|
| 798 | </DL> |
---|
| 799 | <HR> |
---|
| 800 | |
---|
| 801 | <A NAME="hashCode()"><!-- --></A><H3> |
---|
| 802 | hashCode</H3> |
---|
| 803 | <PRE> |
---|
| 804 | public int <B>hashCode</B>()</PRE> |
---|
| 805 | <DL> |
---|
| 806 | <DD><B>Description copied from class: <CODE><A HREF="../../../../org/apache/hadoop/io/BinaryComparable.html#hashCode()">BinaryComparable</A></CODE></B></DD> |
---|
| 807 | <DD>Return a hash of the bytes returned from {#getBytes()}. |
---|
| 808 | <P> |
---|
| 809 | <DD><DL> |
---|
| 810 | <DT><B>Overrides:</B><DD><CODE><A HREF="../../../../org/apache/hadoop/io/BinaryComparable.html#hashCode()">hashCode</A></CODE> in class <CODE><A HREF="../../../../org/apache/hadoop/io/BinaryComparable.html" title="class in org.apache.hadoop.io">BinaryComparable</A></CODE></DL> |
---|
| 811 | </DD> |
---|
| 812 | <DD><DL> |
---|
| 813 | <DT><B>See Also:</B><DD><A HREF="../../../../org/apache/hadoop/io/WritableComparator.html#hashBytes(byte[], int)"><CODE>WritableComparator.hashBytes(byte[],int)</CODE></A></DL> |
---|
| 814 | </DD> |
---|
| 815 | </DL> |
---|
| 816 | <HR> |
---|
| 817 | |
---|
| 818 | <A NAME="decode(byte[])"><!-- --></A><H3> |
---|
| 819 | decode</H3> |
---|
| 820 | <PRE> |
---|
| 821 | public static <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>decode</B>(byte[] utf8) |
---|
| 822 | throws <A HREF="http://java.sun.com/javase/6/docs/api/java/nio/charset/CharacterCodingException.html?is-external=true" title="class or interface in java.nio.charset">CharacterCodingException</A></PRE> |
---|
| 823 | <DL> |
---|
| 824 | <DD>Converts the provided byte array to a String using the |
---|
| 825 | UTF-8 encoding. If the input is malformed, |
---|
| 826 | replace by a default value. |
---|
| 827 | <P> |
---|
| 828 | <DD><DL> |
---|
| 829 | </DL> |
---|
| 830 | </DD> |
---|
| 831 | <DD><DL> |
---|
| 832 | |
---|
| 833 | <DT><B>Throws:</B> |
---|
| 834 | <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/nio/charset/CharacterCodingException.html?is-external=true" title="class or interface in java.nio.charset">CharacterCodingException</A></CODE></DL> |
---|
| 835 | </DD> |
---|
| 836 | </DL> |
---|
| 837 | <HR> |
---|
| 838 | |
---|
| 839 | <A NAME="decode(byte[], int, int)"><!-- --></A><H3> |
---|
| 840 | decode</H3> |
---|
| 841 | <PRE> |
---|
| 842 | public static <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>decode</B>(byte[] utf8, |
---|
| 843 | int start, |
---|
| 844 | int length) |
---|
| 845 | throws <A HREF="http://java.sun.com/javase/6/docs/api/java/nio/charset/CharacterCodingException.html?is-external=true" title="class or interface in java.nio.charset">CharacterCodingException</A></PRE> |
---|
| 846 | <DL> |
---|
| 847 | <DD><DL> |
---|
| 848 | </DL> |
---|
| 849 | </DD> |
---|
| 850 | <DD><DL> |
---|
| 851 | |
---|
| 852 | <DT><B>Throws:</B> |
---|
| 853 | <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/nio/charset/CharacterCodingException.html?is-external=true" title="class or interface in java.nio.charset">CharacterCodingException</A></CODE></DL> |
---|
| 854 | </DD> |
---|
| 855 | </DL> |
---|
| 856 | <HR> |
---|
| 857 | |
---|
| 858 | <A NAME="decode(byte[], int, int, boolean)"><!-- --></A><H3> |
---|
| 859 | decode</H3> |
---|
| 860 | <PRE> |
---|
| 861 | public static <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>decode</B>(byte[] utf8, |
---|
| 862 | int start, |
---|
| 863 | int length, |
---|
| 864 | boolean replace) |
---|
| 865 | throws <A HREF="http://java.sun.com/javase/6/docs/api/java/nio/charset/CharacterCodingException.html?is-external=true" title="class or interface in java.nio.charset">CharacterCodingException</A></PRE> |
---|
| 866 | <DL> |
---|
| 867 | <DD>Converts the provided byte array to a String using the |
---|
| 868 | UTF-8 encoding. If <code>replace</code> is true, then |
---|
| 869 | malformed input is replaced with the |
---|
| 870 | substitution character, which is U+FFFD. Otherwise the |
---|
| 871 | method throws a MalformedInputException. |
---|
| 872 | <P> |
---|
| 873 | <DD><DL> |
---|
| 874 | </DL> |
---|
| 875 | </DD> |
---|
| 876 | <DD><DL> |
---|
| 877 | |
---|
| 878 | <DT><B>Throws:</B> |
---|
| 879 | <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/nio/charset/CharacterCodingException.html?is-external=true" title="class or interface in java.nio.charset">CharacterCodingException</A></CODE></DL> |
---|
| 880 | </DD> |
---|
| 881 | </DL> |
---|
| 882 | <HR> |
---|
| 883 | |
---|
| 884 | <A NAME="encode(java.lang.String)"><!-- --></A><H3> |
---|
| 885 | encode</H3> |
---|
| 886 | <PRE> |
---|
| 887 | public static <A HREF="http://java.sun.com/javase/6/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</A> <B>encode</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> string) |
---|
| 888 | throws <A HREF="http://java.sun.com/javase/6/docs/api/java/nio/charset/CharacterCodingException.html?is-external=true" title="class or interface in java.nio.charset">CharacterCodingException</A></PRE> |
---|
| 889 | <DL> |
---|
| 890 | <DD>Converts the provided String to bytes using the |
---|
| 891 | UTF-8 encoding. If the input is malformed, |
---|
| 892 | invalid chars are replaced by a default value. |
---|
| 893 | <P> |
---|
| 894 | <DD><DL> |
---|
| 895 | </DL> |
---|
| 896 | </DD> |
---|
| 897 | <DD><DL> |
---|
| 898 | |
---|
| 899 | <DT><B>Returns:</B><DD>ByteBuffer: bytes stores at ByteBuffer.array() |
---|
| 900 | and length is ByteBuffer.limit() |
---|
| 901 | <DT><B>Throws:</B> |
---|
| 902 | <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/nio/charset/CharacterCodingException.html?is-external=true" title="class or interface in java.nio.charset">CharacterCodingException</A></CODE></DL> |
---|
| 903 | </DD> |
---|
| 904 | </DL> |
---|
| 905 | <HR> |
---|
| 906 | |
---|
| 907 | <A NAME="encode(java.lang.String, boolean)"><!-- --></A><H3> |
---|
| 908 | encode</H3> |
---|
| 909 | <PRE> |
---|
| 910 | public static <A HREF="http://java.sun.com/javase/6/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</A> <B>encode</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> string, |
---|
| 911 | boolean replace) |
---|
| 912 | throws <A HREF="http://java.sun.com/javase/6/docs/api/java/nio/charset/CharacterCodingException.html?is-external=true" title="class or interface in java.nio.charset">CharacterCodingException</A></PRE> |
---|
| 913 | <DL> |
---|
| 914 | <DD>Converts the provided String to bytes using the |
---|
| 915 | UTF-8 encoding. If <code>replace</code> is true, then |
---|
| 916 | malformed input is replaced with the |
---|
| 917 | substitution character, which is U+FFFD. Otherwise the |
---|
| 918 | method throws a MalformedInputException. |
---|
| 919 | <P> |
---|
| 920 | <DD><DL> |
---|
| 921 | </DL> |
---|
| 922 | </DD> |
---|
| 923 | <DD><DL> |
---|
| 924 | |
---|
| 925 | <DT><B>Returns:</B><DD>ByteBuffer: bytes stores at ByteBuffer.array() |
---|
| 926 | and length is ByteBuffer.limit() |
---|
| 927 | <DT><B>Throws:</B> |
---|
| 928 | <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/nio/charset/CharacterCodingException.html?is-external=true" title="class or interface in java.nio.charset">CharacterCodingException</A></CODE></DL> |
---|
| 929 | </DD> |
---|
| 930 | </DL> |
---|
| 931 | <HR> |
---|
| 932 | |
---|
| 933 | <A NAME="readString(java.io.DataInput)"><!-- --></A><H3> |
---|
| 934 | readString</H3> |
---|
| 935 | <PRE> |
---|
| 936 | public static <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>readString</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataInput.html?is-external=true" title="class or interface in java.io">DataInput</A> in) |
---|
| 937 | 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> |
---|
| 938 | <DL> |
---|
| 939 | <DD>Read a UTF8 encoded string from in |
---|
| 940 | <P> |
---|
| 941 | <DD><DL> |
---|
| 942 | </DL> |
---|
| 943 | </DD> |
---|
| 944 | <DD><DL> |
---|
| 945 | |
---|
| 946 | <DT><B>Throws:</B> |
---|
| 947 | <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> |
---|
| 948 | </DD> |
---|
| 949 | </DL> |
---|
| 950 | <HR> |
---|
| 951 | |
---|
| 952 | <A NAME="writeString(java.io.DataOutput, java.lang.String)"><!-- --></A><H3> |
---|
| 953 | writeString</H3> |
---|
| 954 | <PRE> |
---|
| 955 | public static int <B>writeString</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io">DataOutput</A> out, |
---|
| 956 | <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> s) |
---|
| 957 | 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> |
---|
| 958 | <DL> |
---|
| 959 | <DD>Write a UTF8 encoded string to out |
---|
| 960 | <P> |
---|
| 961 | <DD><DL> |
---|
| 962 | </DL> |
---|
| 963 | </DD> |
---|
| 964 | <DD><DL> |
---|
| 965 | |
---|
| 966 | <DT><B>Throws:</B> |
---|
| 967 | <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> |
---|
| 968 | </DD> |
---|
| 969 | </DL> |
---|
| 970 | <HR> |
---|
| 971 | |
---|
| 972 | <A NAME="validateUTF8(byte[])"><!-- --></A><H3> |
---|
| 973 | validateUTF8</H3> |
---|
| 974 | <PRE> |
---|
| 975 | public static void <B>validateUTF8</B>(byte[] utf8) |
---|
| 976 | throws <A HREF="http://java.sun.com/javase/6/docs/api/java/nio/charset/MalformedInputException.html?is-external=true" title="class or interface in java.nio.charset">MalformedInputException</A></PRE> |
---|
| 977 | <DL> |
---|
| 978 | <DD>Check if a byte array contains valid utf-8 |
---|
| 979 | <P> |
---|
| 980 | <DD><DL> |
---|
| 981 | </DL> |
---|
| 982 | </DD> |
---|
| 983 | <DD><DL> |
---|
| 984 | <DT><B>Parameters:</B><DD><CODE>utf8</CODE> - byte array |
---|
| 985 | <DT><B>Throws:</B> |
---|
| 986 | <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/nio/charset/MalformedInputException.html?is-external=true" title="class or interface in java.nio.charset">MalformedInputException</A></CODE> - if the byte array contains invalid utf-8</DL> |
---|
| 987 | </DD> |
---|
| 988 | </DL> |
---|
| 989 | <HR> |
---|
| 990 | |
---|
| 991 | <A NAME="validateUTF8(byte[], int, int)"><!-- --></A><H3> |
---|
| 992 | validateUTF8</H3> |
---|
| 993 | <PRE> |
---|
| 994 | public static void <B>validateUTF8</B>(byte[] utf8, |
---|
| 995 | int start, |
---|
| 996 | int len) |
---|
| 997 | throws <A HREF="http://java.sun.com/javase/6/docs/api/java/nio/charset/MalformedInputException.html?is-external=true" title="class or interface in java.nio.charset">MalformedInputException</A></PRE> |
---|
| 998 | <DL> |
---|
| 999 | <DD>Check to see if a byte array is valid utf-8 |
---|
| 1000 | <P> |
---|
| 1001 | <DD><DL> |
---|
| 1002 | </DL> |
---|
| 1003 | </DD> |
---|
| 1004 | <DD><DL> |
---|
| 1005 | <DT><B>Parameters:</B><DD><CODE>utf8</CODE> - the array of bytes<DD><CODE>start</CODE> - the offset of the first byte in the array<DD><CODE>len</CODE> - the length of the byte sequence |
---|
| 1006 | <DT><B>Throws:</B> |
---|
| 1007 | <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/nio/charset/MalformedInputException.html?is-external=true" title="class or interface in java.nio.charset">MalformedInputException</A></CODE> - if the byte array contains invalid bytes</DL> |
---|
| 1008 | </DD> |
---|
| 1009 | </DL> |
---|
| 1010 | <HR> |
---|
| 1011 | |
---|
| 1012 | <A NAME="bytesToCodePoint(java.nio.ByteBuffer)"><!-- --></A><H3> |
---|
| 1013 | bytesToCodePoint</H3> |
---|
| 1014 | <PRE> |
---|
| 1015 | public static int <B>bytesToCodePoint</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</A> bytes)</PRE> |
---|
| 1016 | <DL> |
---|
| 1017 | <DD>Returns the next code point at the current position in |
---|
| 1018 | the buffer. The buffer's position will be incremented. |
---|
| 1019 | Any mark set on this buffer will be changed by this method! |
---|
| 1020 | <P> |
---|
| 1021 | <DD><DL> |
---|
| 1022 | </DL> |
---|
| 1023 | </DD> |
---|
| 1024 | <DD><DL> |
---|
| 1025 | </DL> |
---|
| 1026 | </DD> |
---|
| 1027 | </DL> |
---|
| 1028 | <HR> |
---|
| 1029 | |
---|
| 1030 | <A NAME="utf8Length(java.lang.String)"><!-- --></A><H3> |
---|
| 1031 | utf8Length</H3> |
---|
| 1032 | <PRE> |
---|
| 1033 | public static int <B>utf8Length</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> string)</PRE> |
---|
| 1034 | <DL> |
---|
| 1035 | <DD>For the given string, returns the number of UTF-8 bytes |
---|
| 1036 | required to encode the string. |
---|
| 1037 | <P> |
---|
| 1038 | <DD><DL> |
---|
| 1039 | </DL> |
---|
| 1040 | </DD> |
---|
| 1041 | <DD><DL> |
---|
| 1042 | <DT><B>Parameters:</B><DD><CODE>string</CODE> - text to encode |
---|
| 1043 | <DT><B>Returns:</B><DD>number of UTF-8 bytes required to encode</DL> |
---|
| 1044 | </DD> |
---|
| 1045 | </DL> |
---|
| 1046 | <!-- ========= END OF CLASS DATA ========= --> |
---|
| 1047 | <HR> |
---|
| 1048 | |
---|
| 1049 | |
---|
| 1050 | <!-- ======= START OF BOTTOM NAVBAR ====== --> |
---|
| 1051 | <A NAME="navbar_bottom"><!-- --></A> |
---|
| 1052 | <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> |
---|
| 1053 | <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
---|
| 1054 | <TR> |
---|
| 1055 | <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
---|
| 1056 | <A NAME="navbar_bottom_firstrow"><!-- --></A> |
---|
| 1057 | <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
---|
| 1058 | <TR ALIGN="center" VALIGN="top"> |
---|
| 1059 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
---|
| 1060 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
---|
| 1061 | <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
---|
| 1062 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Text.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
---|
| 1063 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
---|
| 1064 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
---|
| 1065 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
---|
| 1066 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
---|
| 1067 | </TR> |
---|
| 1068 | </TABLE> |
---|
| 1069 | </TD> |
---|
| 1070 | <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
---|
| 1071 | </EM> |
---|
| 1072 | </TD> |
---|
| 1073 | </TR> |
---|
| 1074 | |
---|
| 1075 | <TR> |
---|
| 1076 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
---|
| 1077 | <A HREF="../../../../org/apache/hadoop/io/Stringifier.html" title="interface in org.apache.hadoop.io"><B>PREV CLASS</B></A> |
---|
| 1078 | <A HREF="../../../../org/apache/hadoop/io/Text.Comparator.html" title="class in org.apache.hadoop.io"><B>NEXT CLASS</B></A></FONT></TD> |
---|
| 1079 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
---|
| 1080 | <A HREF="../../../../index.html?org/apache/hadoop/io/Text.html" target="_top"><B>FRAMES</B></A> |
---|
| 1081 | <A HREF="Text.html" target="_top"><B>NO FRAMES</B></A> |
---|
| 1082 | <SCRIPT type="text/javascript"> |
---|
| 1083 | <!-- |
---|
| 1084 | if(window==top) { |
---|
| 1085 | document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
---|
| 1086 | } |
---|
| 1087 | //--> |
---|
| 1088 | </SCRIPT> |
---|
| 1089 | <NOSCRIPT> |
---|
| 1090 | <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> |
---|
| 1091 | </NOSCRIPT> |
---|
| 1092 | |
---|
| 1093 | |
---|
| 1094 | </FONT></TD> |
---|
| 1095 | </TR> |
---|
| 1096 | <TR> |
---|
| 1097 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
| 1098 | SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
---|
| 1099 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
| 1100 | DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
---|
| 1101 | </TR> |
---|
| 1102 | </TABLE> |
---|
| 1103 | <A NAME="skip-navbar_bottom"></A> |
---|
| 1104 | <!-- ======== END OF BOTTOM NAVBAR ======= --> |
---|
| 1105 | |
---|
| 1106 | <HR> |
---|
| 1107 | Copyright © 2009 The Apache Software Foundation |
---|
| 1108 | </BODY> |
---|
| 1109 | </HTML> |
---|