Debian Codegraph @

docs/java/com/sleepycat/util/UtfOps.html

raw symbols SCIP
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_51) on Mon Sep 09 11:47:06 EDT 2013 -->
6 <TITLE>
7 UtfOps (Oracle - Berkeley DB Java API)
8 </TITLE>
9
10 <META NAME="date" CONTENT="2013-09-09">
11
12 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../style.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="UtfOps (Oracle - Berkeley DB Java 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/UtfOps.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 <b>Berkeley DB</b><br><font size="-1"> version 5.3.28</font></EM>
53 </TD>
54 </TR>
55
56 <TR>
57 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
58 &nbsp;<A HREF="../../../com/sleepycat/util/RuntimeExceptionWrapper.html" title="class in com.sleepycat.util"><B>PREV CLASS</B></A>&nbsp;
59 &nbsp;NEXT CLASS</FONT></TD>
60 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
61 <A HREF="../../../index.html?com/sleepycat/util/UtfOps.html" target="_top"><B>FRAMES</B></A> &nbsp;
62 &nbsp;<A HREF="UtfOps.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">
81 DETAIL:&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">
91 com.sleepycat.util</FONT>
92 <BR>
93 Class UtfOps</H2>
94 <PRE>
95 <A HREF="http://download.oracle.com/javase/1.5.0/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>com.sleepycat.util.UtfOps</B>
97 </PRE>
98 <HR>
99 <DL>
100 <DT><PRE>public class <B>UtfOps</B><DT>extends <A HREF="http://download.oracle.com/javase/1.5.0/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 UTF operations with more flexibility than is provided by DataInput and
105 DataOutput.
106 <P>
107
108 <P>
109 <HR>
110
111 <P>
112
113 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
114
115 <A NAME="constructor_summary"><!-- --></A>
116 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
117 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
118 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
119 <B>Constructor Summary</B></FONT></TH>
120 </TR>
121 <TR BGCOLOR="white" CLASS="TableRowColor">
122 <TD><CODE><B><A HREF="../../../com/sleepycat/util/UtfOps.html#UtfOps()">UtfOps</A></B>()</CODE>
123
124 <BR>
125 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
126 </TR>
127 </TABLE>
128 &nbsp;
129 <!-- ========== METHOD SUMMARY =========== -->
130
131 <A NAME="method_summary"><!-- --></A>
132 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
133 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
134 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
135 <B>Method Summary</B></FONT></TH>
136 </TR>
137 <TR BGCOLOR="white" CLASS="TableRowColor">
138 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
139 <CODE>static&nbsp;int</CODE></FONT></TD>
140 <TD><CODE><B><A HREF="../../../com/sleepycat/util/UtfOps.html#bytesToChars(byte[], int, char[], int, int, boolean)">bytesToChars</A></B>(byte[]&nbsp;bytes,
141 int&nbsp;byteOffset,
142 char[]&nbsp;chars,
143 int&nbsp;charOffset,
144 int&nbsp;len,
145 boolean&nbsp;isByteLen)</CODE>
146
147 <BR>
148 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Converts byte arrays into character arrays.</TD>
149 </TR>
150 <TR BGCOLOR="white" CLASS="TableRowColor">
151 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
152 <CODE>static&nbsp;<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
153 <TD><CODE><B><A HREF="../../../com/sleepycat/util/UtfOps.html#bytesToString(byte[], int, int)">bytesToString</A></B>(byte[]&nbsp;bytes,
154 int&nbsp;offset,
155 int&nbsp;length)</CODE>
156
157 <BR>
158 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Converts byte arrays into strings.</TD>
159 </TR>
160 <TR BGCOLOR="white" CLASS="TableRowColor">
161 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
162 <CODE>static&nbsp;void</CODE></FONT></TD>
163 <TD><CODE><B><A HREF="../../../com/sleepycat/util/UtfOps.html#charsToBytes(char[], int, byte[], int, int)">charsToBytes</A></B>(char[]&nbsp;chars,
164 int&nbsp;charOffset,
165 byte[]&nbsp;bytes,
166 int&nbsp;byteOffset,
167 int&nbsp;charLength)</CODE>
168
169 <BR>
170 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Converts character arrays into byte arrays.</TD>
171 </TR>
172 <TR BGCOLOR="white" CLASS="TableRowColor">
173 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
174 <CODE>static&nbsp;int</CODE></FONT></TD>
175 <TD><CODE><B><A HREF="../../../com/sleepycat/util/UtfOps.html#getByteLength(char[])">getByteLength</A></B>(char[]&nbsp;chars)</CODE>
176
177 <BR>
178 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the byte length of the UTF string that would be created by
179 converting the given characters to UTF.</TD>
180 </TR>
181 <TR BGCOLOR="white" CLASS="TableRowColor">
182 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
183 <CODE>static&nbsp;int</CODE></FONT></TD>
184 <TD><CODE><B><A HREF="../../../com/sleepycat/util/UtfOps.html#getByteLength(char[], int, int)">getByteLength</A></B>(char[]&nbsp;chars,
185 int&nbsp;offset,
186 int&nbsp;length)</CODE>
187
188 <BR>
189 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the byte length of the UTF string that would be created by
190 converting the given characters to UTF.</TD>
191 </TR>
192 <TR BGCOLOR="white" CLASS="TableRowColor">
193 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
194 <CODE>static&nbsp;int</CODE></FONT></TD>
195 <TD><CODE><B><A HREF="../../../com/sleepycat/util/UtfOps.html#getCharLength(byte[])">getCharLength</A></B>(byte[]&nbsp;bytes)</CODE>
196
197 <BR>
198 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of characters represented by the given UTF string.</TD>
199 </TR>
200 <TR BGCOLOR="white" CLASS="TableRowColor">
201 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
202 <CODE>static&nbsp;int</CODE></FONT></TD>
203 <TD><CODE><B><A HREF="../../../com/sleepycat/util/UtfOps.html#getCharLength(byte[], int, int)">getCharLength</A></B>(byte[]&nbsp;bytes,
204 int&nbsp;offset,
205 int&nbsp;length)</CODE>
206
207 <BR>
208 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of characters represented by the given UTF string.</TD>
209 </TR>
210 <TR BGCOLOR="white" CLASS="TableRowColor">
211 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
212 <CODE>static&nbsp;int</CODE></FONT></TD>
213 <TD><CODE><B><A HREF="../../../com/sleepycat/util/UtfOps.html#getZeroTerminatedByteLength(byte[], int)">getZeroTerminatedByteLength</A></B>(byte[]&nbsp;bytes,
214 int&nbsp;offset)</CODE>
215
216 <BR>
217 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the byte length of a null terminated UTF string, not including
218 the terminator.</TD>
219 </TR>
220 <TR BGCOLOR="white" CLASS="TableRowColor">
221 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
222 <CODE>static&nbsp;byte[]</CODE></FONT></TD>
223 <TD><CODE><B><A HREF="../../../com/sleepycat/util/UtfOps.html#stringToBytes(java.lang.String)">stringToBytes</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;string)</CODE>
224
225 <BR>
226 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Converts strings to byte arrays.</TD>
227 </TR>
228 </TABLE>
229 &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
230 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
231 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
232 <TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
233 </TR>
234 <TR BGCOLOR="white" CLASS="TableRowColor">
235 <TD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://download.oracle.com/javase/1.5.0/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://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
236 </TR>
237 </TABLE>
238 &nbsp;
239 <P>
240
241 <!-- ========= CONSTRUCTOR DETAIL ======== -->
242
243 <A NAME="constructor_detail"><!-- --></A>
244 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
245 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
246 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
247 <B>Constructor Detail</B></FONT></TH>
248 </TR>
249 </TABLE>
250
251 <A NAME="UtfOps()"><!-- --></A><H3>
252 UtfOps</H3>
253 <PRE>
254 public <B>UtfOps</B>()</PRE>
255 <DL>
256 </DL>
257
258 <!-- ============ METHOD DETAIL ========== -->
259
260 <A NAME="method_detail"><!-- --></A>
261 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
262 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
263 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
264 <B>Method Detail</B></FONT></TH>
265 </TR>
266 </TABLE>
267
268 <A NAME="getZeroTerminatedByteLength(byte[], int)"><!-- --></A><H3>
269 getZeroTerminatedByteLength</H3>
270 <PRE>
271 public static int <B>getZeroTerminatedByteLength</B>(byte[]&nbsp;bytes,
272 int&nbsp;offset)
273 throws <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</A></PRE>
274 <DL>
275 <DD>Returns the byte length of a null terminated UTF string, not including
276 the terminator.
277 <P>
278 <DD><DL>
279 <DT><B>Parameters:</B><DD><CODE>bytes</CODE> - the data containing the UTF string.<DD><CODE>offset</CODE> - the beginning of the string the measure.
280 <DT><B>Returns:</B><DD>the number of bytes.
281 <DT><B>Throws:</B>
282 <DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</A></CODE> - if no zero terminator is found.</DL>
283 </DD>
284 </DL>
285 <HR>
286
287 <A NAME="getByteLength(char[])"><!-- --></A><H3>
288 getByteLength</H3>
289 <PRE>
290 public static int <B>getByteLength</B>(char[]&nbsp;chars)</PRE>
291 <DL>
292 <DD>Returns the byte length of the UTF string that would be created by
293 converting the given characters to UTF.
294 <P>
295 <DD><DL>
296 <DT><B>Parameters:</B><DD><CODE>chars</CODE> - the characters that would be converted.
297 <DT><B>Returns:</B><DD>the byte length of the equivalent UTF data.</DL>
298 </DD>
299 </DL>
300 <HR>
301
302 <A NAME="getByteLength(char[], int, int)"><!-- --></A><H3>
303 getByteLength</H3>
304 <PRE>
305 public static int <B>getByteLength</B>(char[]&nbsp;chars,
306 int&nbsp;offset,
307 int&nbsp;length)</PRE>
308 <DL>
309 <DD>Returns the byte length of the UTF string that would be created by
310 converting the given characters to UTF.
311 <P>
312 <DD><DL>
313 <DT><B>Parameters:</B><DD><CODE>chars</CODE> - the characters that would be converted.<DD><CODE>offset</CODE> - the first character to be converted.<DD><CODE>length</CODE> - the number of characters to be converted.
314 <DT><B>Returns:</B><DD>the byte length of the equivalent UTF data.</DL>
315 </DD>
316 </DL>
317 <HR>
318
319 <A NAME="getCharLength(byte[])"><!-- --></A><H3>
320 getCharLength</H3>
321 <PRE>
322 public static int <B>getCharLength</B>(byte[]&nbsp;bytes)
323 throws <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A>,
324 <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</A></PRE>
325 <DL>
326 <DD>Returns the number of characters represented by the given UTF string.
327 <P>
328 <DD><DL>
329 <DT><B>Parameters:</B><DD><CODE>bytes</CODE> - the UTF string.
330 <DT><B>Returns:</B><DD>the number of characters.
331 <DT><B>Throws:</B>
332 <DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</A></CODE> - if a UTF character sequence at the end
333 of the data is not complete.
334 <DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if an illegal UTF sequence is
335 encountered.</DL>
336 </DD>
337 </DL>
338 <HR>
339
340 <A NAME="getCharLength(byte[], int, int)"><!-- --></A><H3>
341 getCharLength</H3>
342 <PRE>
343 public static int <B>getCharLength</B>(byte[]&nbsp;bytes,
344 int&nbsp;offset,
345 int&nbsp;length)
346 throws <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A>,
347 <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</A></PRE>
348 <DL>
349 <DD>Returns the number of characters represented by the given UTF string.
350 <P>
351 <DD><DL>
352 <DT><B>Parameters:</B><DD><CODE>bytes</CODE> - the data containing the UTF string.<DD><CODE>offset</CODE> - the first byte to be converted.<DD><CODE>length</CODE> - the number of byte to be converted.
353 <DT><B>Throws:</B>
354 <DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</A></CODE> - if a UTF character sequence at the end
355 of the data is not complete.
356 <DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if an illegal UTF sequence is
357 encountered.</DL>
358 </DD>
359 </DL>
360 <HR>
361
362 <A NAME="bytesToChars(byte[], int, char[], int, int, boolean)"><!-- --></A><H3>
363 bytesToChars</H3>
364 <PRE>
365 public static int <B>bytesToChars</B>(byte[]&nbsp;bytes,
366 int&nbsp;byteOffset,
367 char[]&nbsp;chars,
368 int&nbsp;charOffset,
369 int&nbsp;len,
370 boolean&nbsp;isByteLen)
371 throws <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A>,
372 <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</A></PRE>
373 <DL>
374 <DD>Converts byte arrays into character arrays.
375 <P>
376 <DD><DL>
377 <DT><B>Parameters:</B><DD><CODE>bytes</CODE> - the source byte data to convert<DD><CODE>byteOffset</CODE> - the offset into the byte array at which
378 to start the conversion<DD><CODE>chars</CODE> - the destination array<DD><CODE>charOffset</CODE> - the offset into chars at which to begin the copy<DD><CODE>len</CODE> - the amount of information to copy into chars<DD><CODE>isByteLen</CODE> - if true then len is a measure of bytes, otherwise
379 len is a measure of characters
380 <DT><B>Throws:</B>
381 <DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</A></CODE> - if a UTF character sequence at the end
382 of the data is not complete.
383 <DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if an illegal UTF sequence is
384 encountered.</DL>
385 </DD>
386 </DL>
387 <HR>
388
389 <A NAME="charsToBytes(char[], int, byte[], int, int)"><!-- --></A><H3>
390 charsToBytes</H3>
391 <PRE>
392 public static void <B>charsToBytes</B>(char[]&nbsp;chars,
393 int&nbsp;charOffset,
394 byte[]&nbsp;bytes,
395 int&nbsp;byteOffset,
396 int&nbsp;charLength)</PRE>
397 <DL>
398 <DD>Converts character arrays into byte arrays.
399 <P>
400 <DD><DL>
401 <DT><B>Parameters:</B><DD><CODE>chars</CODE> - the source character data to convert<DD><CODE>charOffset</CODE> - the offset into the character array at which
402 to start the conversion<DD><CODE>bytes</CODE> - the destination array<DD><CODE>byteOffset</CODE> - the offset into bytes at which to begin the copy<DD><CODE>charLength</CODE> - the length of characters to copy into bytes</DL>
403 </DD>
404 </DL>
405 <HR>
406
407 <A NAME="bytesToString(byte[], int, int)"><!-- --></A><H3>
408 bytesToString</H3>
409 <PRE>
410 public static <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>bytesToString</B>(byte[]&nbsp;bytes,
411 int&nbsp;offset,
412 int&nbsp;length)
413 throws <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A>,
414 <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</A></PRE>
415 <DL>
416 <DD>Converts byte arrays into strings.
417 <P>
418 <DD><DL>
419 <DT><B>Parameters:</B><DD><CODE>bytes</CODE> - the source byte data to convert<DD><CODE>offset</CODE> - the offset into the byte array at which
420 to start the conversion<DD><CODE>length</CODE> - the number of bytes to be converted.
421 <DT><B>Returns:</B><DD>the string.
422 <DT><B>Throws:</B>
423 <DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</A></CODE> - if a UTF character sequence at the end
424 of the data is not complete.
425 <DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if an illegal UTF sequence is
426 encountered.</DL>
427 </DD>
428 </DL>
429 <HR>
430
431 <A NAME="stringToBytes(java.lang.String)"><!-- --></A><H3>
432 stringToBytes</H3>
433 <PRE>
434 public static byte[] <B>stringToBytes</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;string)</PRE>
435 <DL>
436 <DD>Converts strings to byte arrays.
437 <P>
438 <DD><DL>
439 <DT><B>Parameters:</B><DD><CODE>string</CODE> - the string to convert.
440 <DT><B>Returns:</B><DD>the UTF byte array.</DL>
441 </DD>
442 </DL>
443 <!-- ========= END OF CLASS DATA ========= -->
444 <HR>
445
446
447 <!-- ======= START OF BOTTOM NAVBAR ====== -->
448 <A NAME="navbar_bottom"><!-- --></A>
449 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
450 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
451 <TR>
452 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
453 <A NAME="navbar_bottom_firstrow"><!-- --></A>
454 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
455 <TR ALIGN="center" VALIGN="top">
456 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
457 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
458 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
459 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/UtfOps.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
460 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
461 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
462 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
463 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
464 </TR>
465 </TABLE>
466 </TD>
467 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
468 <b>Berkeley DB</b><br><font size="-1"> version 5.3.28</font></EM>
469 </TD>
470 </TR>
471
472 <TR>
473 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
474 &nbsp;<A HREF="../../../com/sleepycat/util/RuntimeExceptionWrapper.html" title="class in com.sleepycat.util"><B>PREV CLASS</B></A>&nbsp;
475 &nbsp;NEXT CLASS</FONT></TD>
476 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
477 <A HREF="../../../index.html?com/sleepycat/util/UtfOps.html" target="_top"><B>FRAMES</B></A> &nbsp;
478 &nbsp;<A HREF="UtfOps.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
479 &nbsp;<SCRIPT type="text/javascript">
480 <!--
481 if(window==top) {
482 document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
483 }
484 //-->
485 </SCRIPT>
486 <NOSCRIPT>
487 <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
488 </NOSCRIPT>
489
490
491 </FONT></TD>
492 </TR>
493 <TR>
494 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
495 SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
496 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
497 DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
498 </TR>
499 </TABLE>
500 <A NAME="skip-navbar_bottom"></A>
501 <!-- ======== END OF BOTTOM NAVBAR ======= -->
502
503 <HR>
504 <font size=1>Copyright (c) 1996, 2013 Oracle and/or its affiliates. All rights reserved.</font>
505 </BODY>
506 </HTML>