504 lines
24 KiB
HTML
504 lines
24 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<!--NewPage-->
|
|
<HTML>
|
|
<HEAD>
|
|
<!-- Generated by javadoc (build 1.5.0) on Thu May 15 17:17:33 EDT 2008 -->
|
|
<TITLE>
|
|
UtfOps (Oracle - Berkeley DB Java API)
|
|
</TITLE>
|
|
|
|
<META NAME="keywords" CONTENT="com.sleepycat.util.UtfOps class">
|
|
|
|
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../style.css" TITLE="Style">
|
|
|
|
<SCRIPT type="text/javascript">
|
|
function windowTitle()
|
|
{
|
|
parent.document.title="UtfOps (Oracle - Berkeley DB Java API)";
|
|
}
|
|
</SCRIPT>
|
|
<NOSCRIPT>
|
|
</NOSCRIPT>
|
|
|
|
</HEAD>
|
|
|
|
<BODY BGCOLOR="white" onload="windowTitle();">
|
|
|
|
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<A NAME="navbar_top"><!-- --></A>
|
|
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
|
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
|
<TR>
|
|
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
|
<A NAME="navbar_top_firstrow"><!-- --></A>
|
|
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
|
<TR ALIGN="center" VALIGN="top">
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/UtfOps.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
|
</TR>
|
|
</TABLE>
|
|
</TD>
|
|
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
|
<b>Berkeley DB</b><br><font size="-1"> version 4.7.25</font></EM>
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../com/sleepycat/util/RuntimeExceptionWrapper.html" title="class in com.sleepycat.util"><B>PREV CLASS</B></A>
|
|
NEXT CLASS</FONT></TD>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../index.html?com/sleepycat/util/UtfOps.html" target="_top"><B>FRAMES</B></A>
|
|
<A HREF="UtfOps.html" target="_top"><B>NO FRAMES</B></A>
|
|
<SCRIPT type="text/javascript">
|
|
<!--
|
|
if(window==top) {
|
|
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
|
}
|
|
//-->
|
|
</SCRIPT>
|
|
<NOSCRIPT>
|
|
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
|
|
</NOSCRIPT>
|
|
|
|
|
|
</FONT></TD>
|
|
</TR>
|
|
<TR>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
|
</TR>
|
|
</TABLE>
|
|
<A NAME="skip-navbar_top"></A>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
|
|
<HR>
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<H2>
|
|
<FONT SIZE="-1">
|
|
com.sleepycat.util</FONT>
|
|
<BR>
|
|
Class UtfOps</H2>
|
|
<PRE>
|
|
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">java.lang.Object</A>
|
|
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.sleepycat.util.UtfOps</B>
|
|
</PRE>
|
|
<HR>
|
|
<DL>
|
|
<DT><PRE>public class <B>UtfOps</B><DT>extends <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></DL>
|
|
</PRE>
|
|
|
|
<P>
|
|
UTF operations with more flexibility than is provided by DataInput and
|
|
DataOutput.
|
|
<P>
|
|
|
|
<P>
|
|
<HR>
|
|
|
|
<P>
|
|
|
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
|
|
<A NAME="constructor_summary"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
|
<B>Constructor Summary</B></FONT></TH>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD><CODE><B><A HREF="../../../com/sleepycat/util/UtfOps.html#UtfOps()">UtfOps</A></B>()</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
|
|
<A NAME="method_summary"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
|
<B>Method Summary</B></FONT></TH>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>static int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/sleepycat/util/UtfOps.html#bytesToChars(byte[], int, char[], int, int, boolean)">bytesToChars</A></B>(byte[] bytes,
|
|
int byteOffset,
|
|
char[] chars,
|
|
int charOffset,
|
|
int len,
|
|
boolean isByteLen)</CODE>
|
|
|
|
<BR>
|
|
Converts byte arrays into character arrays.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>static <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/sleepycat/util/UtfOps.html#bytesToString(byte[], int, int)">bytesToString</A></B>(byte[] bytes,
|
|
int offset,
|
|
int length)</CODE>
|
|
|
|
<BR>
|
|
Converts byte arrays into strings.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>static void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/sleepycat/util/UtfOps.html#charsToBytes(char[], int, byte[], int, int)">charsToBytes</A></B>(char[] chars,
|
|
int charOffset,
|
|
byte[] bytes,
|
|
int byteOffset,
|
|
int charLength)</CODE>
|
|
|
|
<BR>
|
|
Converts character arrays into byte arrays.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>static int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/sleepycat/util/UtfOps.html#getByteLength(char[])">getByteLength</A></B>(char[] chars)</CODE>
|
|
|
|
<BR>
|
|
Returns the byte length of the UTF string that would be created by
|
|
converting the given characters to UTF.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>static int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/sleepycat/util/UtfOps.html#getByteLength(char[], int, int)">getByteLength</A></B>(char[] chars,
|
|
int offset,
|
|
int length)</CODE>
|
|
|
|
<BR>
|
|
Returns the byte length of the UTF string that would be created by
|
|
converting the given characters to UTF.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>static int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/sleepycat/util/UtfOps.html#getCharLength(byte[])">getCharLength</A></B>(byte[] bytes)</CODE>
|
|
|
|
<BR>
|
|
Returns the number of characters represented by the given UTF string.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>static int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/sleepycat/util/UtfOps.html#getCharLength(byte[], int, int)">getCharLength</A></B>(byte[] bytes,
|
|
int offset,
|
|
int length)</CODE>
|
|
|
|
<BR>
|
|
Returns the number of characters represented by the given UTF string.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>static int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/sleepycat/util/UtfOps.html#getZeroTerminatedByteLength(byte[], int)">getZeroTerminatedByteLength</A></B>(byte[] bytes,
|
|
int offset)</CODE>
|
|
|
|
<BR>
|
|
Returns the byte length of a null terminated UTF string, not including
|
|
the terminator.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>static byte[]</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/sleepycat/util/UtfOps.html#stringToBytes(java.lang.String)">stringToBytes</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> string)</CODE>
|
|
|
|
<BR>
|
|
Converts strings to byte arrays.</TD>
|
|
</TR>
|
|
</TABLE>
|
|
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
|
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TH>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<P>
|
|
|
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
|
|
<A NAME="constructor_detail"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
|
<B>Constructor Detail</B></FONT></TH>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<A NAME="UtfOps()"><!-- --></A><H3>
|
|
UtfOps</H3>
|
|
<PRE>
|
|
public <B>UtfOps</B>()</PRE>
|
|
<DL>
|
|
</DL>
|
|
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
|
|
<A NAME="method_detail"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
|
<B>Method Detail</B></FONT></TH>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<A NAME="getZeroTerminatedByteLength(byte[], int)"><!-- --></A><H3>
|
|
getZeroTerminatedByteLength</H3>
|
|
<PRE>
|
|
public static int <B>getZeroTerminatedByteLength</B>(byte[] bytes,
|
|
int offset)
|
|
throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang">IndexOutOfBoundsException</A></PRE>
|
|
<DL>
|
|
<DD>Returns the byte length of a null terminated UTF string, not including
|
|
the terminator.
|
|
<P>
|
|
<DD><DL>
|
|
<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.
|
|
<DT><B>Returns:</B><DD>the number of bytes.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang">IndexOutOfBoundsException</A></CODE> - if no zero terminator is found.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getByteLength(char[])"><!-- --></A><H3>
|
|
getByteLength</H3>
|
|
<PRE>
|
|
public static int <B>getByteLength</B>(char[] chars)</PRE>
|
|
<DL>
|
|
<DD>Returns the byte length of the UTF string that would be created by
|
|
converting the given characters to UTF.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>chars</CODE> - the characters that would be converted.
|
|
<DT><B>Returns:</B><DD>the byte length of the equivalent UTF data.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getByteLength(char[], int, int)"><!-- --></A><H3>
|
|
getByteLength</H3>
|
|
<PRE>
|
|
public static int <B>getByteLength</B>(char[] chars,
|
|
int offset,
|
|
int length)</PRE>
|
|
<DL>
|
|
<DD>Returns the byte length of the UTF string that would be created by
|
|
converting the given characters to UTF.
|
|
<P>
|
|
<DD><DL>
|
|
<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.
|
|
<DT><B>Returns:</B><DD>the byte length of the equivalent UTF data.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getCharLength(byte[])"><!-- --></A><H3>
|
|
getCharLength</H3>
|
|
<PRE>
|
|
public static int <B>getCharLength</B>(byte[] bytes)
|
|
throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A>,
|
|
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang">IndexOutOfBoundsException</A></PRE>
|
|
<DL>
|
|
<DD>Returns the number of characters represented by the given UTF string.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>bytes</CODE> - the UTF string.
|
|
<DT><B>Returns:</B><DD>the number of characters.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang">IndexOutOfBoundsException</A></CODE> - if a UTF character sequence at the end
|
|
of the data is not complete.
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if an illegal UTF sequence is
|
|
encountered.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getCharLength(byte[], int, int)"><!-- --></A><H3>
|
|
getCharLength</H3>
|
|
<PRE>
|
|
public static int <B>getCharLength</B>(byte[] bytes,
|
|
int offset,
|
|
int length)
|
|
throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A>,
|
|
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang">IndexOutOfBoundsException</A></PRE>
|
|
<DL>
|
|
<DD>Returns the number of characters represented by the given UTF string.
|
|
<P>
|
|
<DD><DL>
|
|
<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.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang">IndexOutOfBoundsException</A></CODE> - if a UTF character sequence at the end
|
|
of the data is not complete.
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if an illegal UTF sequence is
|
|
encountered.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="bytesToChars(byte[], int, char[], int, int, boolean)"><!-- --></A><H3>
|
|
bytesToChars</H3>
|
|
<PRE>
|
|
public static int <B>bytesToChars</B>(byte[] bytes,
|
|
int byteOffset,
|
|
char[] chars,
|
|
int charOffset,
|
|
int len,
|
|
boolean isByteLen)
|
|
throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A>,
|
|
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang">IndexOutOfBoundsException</A></PRE>
|
|
<DL>
|
|
<DD>Converts byte arrays into character arrays.
|
|
<P>
|
|
<DD><DL>
|
|
<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
|
|
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
|
|
len is a measure of characters
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang">IndexOutOfBoundsException</A></CODE> - if a UTF character sequence at the end
|
|
of the data is not complete.
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if an illegal UTF sequence is
|
|
encountered.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="charsToBytes(char[], int, byte[], int, int)"><!-- --></A><H3>
|
|
charsToBytes</H3>
|
|
<PRE>
|
|
public static void <B>charsToBytes</B>(char[] chars,
|
|
int charOffset,
|
|
byte[] bytes,
|
|
int byteOffset,
|
|
int charLength)</PRE>
|
|
<DL>
|
|
<DD>Converts character arrays into byte arrays.
|
|
<P>
|
|
<DD><DL>
|
|
<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
|
|
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>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="bytesToString(byte[], int, int)"><!-- --></A><H3>
|
|
bytesToString</H3>
|
|
<PRE>
|
|
public static <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>bytesToString</B>(byte[] bytes,
|
|
int offset,
|
|
int length)
|
|
throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A>,
|
|
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang">IndexOutOfBoundsException</A></PRE>
|
|
<DL>
|
|
<DD>Converts byte arrays into strings.
|
|
<P>
|
|
<DD><DL>
|
|
<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
|
|
to start the conversion<DD><CODE>length</CODE> - the number of bytes to be converted.
|
|
<DT><B>Returns:</B><DD>the string.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang">IndexOutOfBoundsException</A></CODE> - if a UTF character sequence at the end
|
|
of the data is not complete.
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if an illegal UTF sequence is
|
|
encountered.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="stringToBytes(java.lang.String)"><!-- --></A><H3>
|
|
stringToBytes</H3>
|
|
<PRE>
|
|
public static byte[] <B>stringToBytes</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> string)</PRE>
|
|
<DL>
|
|
<DD>Converts strings to byte arrays.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>string</CODE> - the string to convert.
|
|
<DT><B>Returns:</B><DD>the UTF byte array.</DL>
|
|
</DD>
|
|
</DL>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
<HR>
|
|
|
|
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
<A NAME="navbar_bottom"><!-- --></A>
|
|
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
|
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
|
<TR>
|
|
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
|
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
|
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
|
<TR ALIGN="center" VALIGN="top">
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/UtfOps.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
|
</TR>
|
|
</TABLE>
|
|
</TD>
|
|
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
|
<b>Berkeley DB</b><br><font size="-1"> version 4.7.25</font></EM>
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../com/sleepycat/util/RuntimeExceptionWrapper.html" title="class in com.sleepycat.util"><B>PREV CLASS</B></A>
|
|
NEXT CLASS</FONT></TD>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../index.html?com/sleepycat/util/UtfOps.html" target="_top"><B>FRAMES</B></A>
|
|
<A HREF="UtfOps.html" target="_top"><B>NO FRAMES</B></A>
|
|
<SCRIPT type="text/javascript">
|
|
<!--
|
|
if(window==top) {
|
|
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
|
}
|
|
//-->
|
|
</SCRIPT>
|
|
<NOSCRIPT>
|
|
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
|
|
</NOSCRIPT>
|
|
|
|
|
|
</FONT></TD>
|
|
</TR>
|
|
<TR>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
|
</TR>
|
|
</TABLE>
|
|
<A NAME="skip-navbar_bottom"></A>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
|
|
<HR>
|
|
<font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
|
|
</BODY>
|
|
</HTML>
|