зеркало из https://github.com/mozilla/gecko-dev.git
1435 строки
57 KiB
HTML
1435 строки
57 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
|
<!--NewPage-->
|
|
<HTML>
|
|
<HEAD>
|
|
<!-- Generated by javadoc on Sun Aug 01 23:07:05 MDT 1999 -->
|
|
<TITLE>
|
|
: Class ByteBuf
|
|
</TITLE>
|
|
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
|
|
</HEAD>
|
|
<BODY BGCOLOR="white">
|
|
|
|
<!-- ========== START OF NAVBAR ========== -->
|
|
<A NAME="navbar_top"><!-- --></A>
|
|
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
|
<TR>
|
|
<TD COLSPAN=2 BGCOLOR="#EEEEFF" ID="NavBarCell1">
|
|
<A NAME="navbar_top_firstrow"><!-- --></A>
|
|
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
|
<TR ALIGN="center" VALIGN="top">
|
|
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#FFFFFF" ID="NavBarCell1Rev"> <FONT ID="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
|
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
|
</TR>
|
|
</TABLE>
|
|
</TD>
|
|
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
|
</EM>
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR>
|
|
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../calypso/util/AttributeValuePair.html"><B>PREV CLASS</B></A>
|
|
<A HREF="../../calypso/util/ByteLineBuffer.html"><B>NEXT CLASS</B></A></FONT></TD>
|
|
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A>
|
|
<A HREF="ByteBuf.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
|
|
</TR>
|
|
<TR>
|
|
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
|
|
SUMMARY: INNER | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
|
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
|
|
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
|
</TR>
|
|
</TABLE>
|
|
<!-- =========== END OF NAVBAR =========== -->
|
|
|
|
<HR>
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<H2>
|
|
<FONT SIZE="-1">
|
|
calypso.util</FONT>
|
|
<BR>
|
|
Class ByteBuf</H2>
|
|
<PRE>
|
|
java.lang.Object
|
|
|
|
|
+--<B>calypso.util.ByteBuf</B>
|
|
</PRE>
|
|
<HR>
|
|
<DL>
|
|
<DT>public final class <B>ByteBuf</B><DT>extends java.lang.Object</DL>
|
|
|
|
<P>
|
|
This class is similar to java/lang/StringBuffer with the following changes:
|
|
<UL><LI>Stores bytes, not chars
|
|
<LI>None of the methods are synchronized
|
|
<LI>There is no sharing of the character array
|
|
<LI>Converting to a String requires a copy of the character data
|
|
<LI>Alloc and Recycle are provided to speed up allocation
|
|
<LI>A bunch of useful operations are provided (comparisons, etc.)
|
|
</UL>
|
|
<P>
|
|
<HR>
|
|
|
|
<P>
|
|
<!-- ======== INNER CLASS SUMMARY ======== -->
|
|
|
|
|
|
<!-- =========== FIELD SUMMARY =========== -->
|
|
|
|
|
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
|
|
<A NAME="constructor_summary"><!-- --></A>
|
|
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
|
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
|
|
<TD COLSPAN=2><FONT SIZE="+2">
|
|
<B>Constructor Summary</B></FONT></TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#ByteBuf()">ByteBuf</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Constructs an empty String buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#ByteBuf(byte[], int, int)">ByteBuf</A></B>(byte[] bytes,
|
|
int offset,
|
|
int length)</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#ByteBuf(int)">ByteBuf</A></B>(int length)</CODE>
|
|
|
|
<BR>
|
|
Constructs an empty byte buffer with the specified initial length.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#ByteBuf(java.lang.String)">ByteBuf</A></B>(java.lang.String str)</CODE>
|
|
|
|
<BR>
|
|
Constructs a byte buffer with the specified initial value.</TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
|
|
<A NAME="method_summary"><!-- --></A>
|
|
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
|
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
|
|
<TD COLSPAN=2><FONT SIZE="+2">
|
|
<B>Method Summary</B></FONT></TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>static <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#Alloc()">Alloc</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Constructs an empty String buffer, reusing one from the
|
|
recycler.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#append(boolean)">append</A></B>(boolean b)</CODE>
|
|
|
|
<BR>
|
|
Appends a boolean to the end of this buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#append(byte)">append</A></B>(byte b)</CODE>
|
|
|
|
<BR>
|
|
Appends a byte to the end of this buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#append(byte[])">append</A></B>(byte[] str)</CODE>
|
|
|
|
<BR>
|
|
Appends an array of bytes to the end of this buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#append(byte[], int, int)">append</A></B>(byte[] str,
|
|
int offset,
|
|
int len)</CODE>
|
|
|
|
<BR>
|
|
Appends a part of an array of characters to the end of this buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#append(calypso.util.ByteBuf)">append</A></B>(<A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A> buf)</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#append(double)">append</A></B>(double d)</CODE>
|
|
|
|
<BR>
|
|
Appends a double to the end of this buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#append(float)">append</A></B>(float f)</CODE>
|
|
|
|
<BR>
|
|
Appends a float to the end of this buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#append(int)">append</A></B>(int i)</CODE>
|
|
|
|
<BR>
|
|
Appends an integer to the end of this buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#append(long)">append</A></B>(long l)</CODE>
|
|
|
|
<BR>
|
|
Appends a long to the end of this buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#append(java.lang.Object)">append</A></B>(java.lang.Object obj)</CODE>
|
|
|
|
<BR>
|
|
Appends an object to the end of this buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#append(java.lang.String)">append</A></B>(java.lang.String str)</CODE>
|
|
|
|
<BR>
|
|
Appends a String to the end of this buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> byte</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#byteAt(int)">byteAt</A></B>(int index)</CODE>
|
|
|
|
<BR>
|
|
Returns the byte at the specified index.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#capacity()">capacity</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Returns the current capacity of the String buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>static void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#EmptyRecycler()">EmptyRecycler</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Empty the recycler discarding any cached ByteBuf objects</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#ensureCapacity(int)">ensureCapacity</A></B>(int minimumCapacity)</CODE>
|
|
|
|
<BR>
|
|
Ensures that the capacity of the buffer is at least equal to the
|
|
specified minimum.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> boolean</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#equals(calypso.util.ByteBuf)">equals</A></B>(<A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A> anotherString)</CODE>
|
|
|
|
<BR>
|
|
Compares this ByteBuf to another ByteBuf.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> boolean</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#equals(java.lang.Object)">equals</A></B>(java.lang.Object aObject)</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> boolean</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#equals(java.lang.String)">equals</A></B>(java.lang.String anotherString)</CODE>
|
|
|
|
<BR>
|
|
Compares this ByteBuf to another String.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> boolean</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#equalsIgnoreCase(calypso.util.ByteBuf)">equalsIgnoreCase</A></B>(<A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A> anotherString)</CODE>
|
|
|
|
<BR>
|
|
Compares this ByteBuf to another ByteBuf.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#fullDump(java.io.PrintStream)">fullDump</A></B>(java.io.PrintStream out)</CODE>
|
|
|
|
<BR>
|
|
Write to the given output stream a detailed description of each
|
|
byte in this buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#fullDump(java.io.PrintStream, int, int)">fullDump</A></B>(java.io.PrintStream out,
|
|
int start,
|
|
int end)</CODE>
|
|
|
|
<BR>
|
|
Write to the given output stream a detailed description of the given
|
|
bytes in this buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#getBytes(int, int, byte[], int)">getBytes</A></B>(int srcBegin,
|
|
int srcEnd,
|
|
byte[] dst,
|
|
int dstBegin)</CODE>
|
|
|
|
<BR>
|
|
Copies the characters of the specified substring (determined by
|
|
srcBegin and srcEnd) into the character array, starting at the
|
|
array's dstBegin location.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#indexOf(int)">indexOf</A></B>(int ch)</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#indexOf(int, int)">indexOf</A></B>(int ch,
|
|
int fromIndex)</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#insert(int, boolean)">insert</A></B>(int offset,
|
|
boolean b)</CODE>
|
|
|
|
<BR>
|
|
Inserts a boolean into the String buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#insert(int, byte)">insert</A></B>(int offset,
|
|
byte b)</CODE>
|
|
|
|
<BR>
|
|
Inserts a byte into the String buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#insert(int, byte[])">insert</A></B>(int offset,
|
|
byte[] str)</CODE>
|
|
|
|
<BR>
|
|
Inserts an array of bytes into the String buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#insert(int, double)">insert</A></B>(int offset,
|
|
double d)</CODE>
|
|
|
|
<BR>
|
|
Inserts a double into the String buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#insert(int, float)">insert</A></B>(int offset,
|
|
float f)</CODE>
|
|
|
|
<BR>
|
|
Inserts a float into the String buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#insert(int, int)">insert</A></B>(int offset,
|
|
int i)</CODE>
|
|
|
|
<BR>
|
|
Inserts an integer into the String buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#insert(int, long)">insert</A></B>(int offset,
|
|
long l)</CODE>
|
|
|
|
<BR>
|
|
Inserts a long into the String buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#insert(int, java.lang.Object)">insert</A></B>(int offset,
|
|
java.lang.Object obj)</CODE>
|
|
|
|
<BR>
|
|
Inserts an object into the String buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#insert(int, java.lang.String)">insert</A></B>(int offset,
|
|
java.lang.String str)</CODE>
|
|
|
|
<BR>
|
|
Inserts a String into the String buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#length()">length</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Returns the length (character count) of the buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> java.io.InputStream</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#makeInputStream()">makeInputStream</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Creates a new InputStream whose content is this ByteBuf.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#read(java.io.InputStream, int)">read</A></B>(java.io.InputStream file,
|
|
int max_bytes)</CODE>
|
|
|
|
<BR>
|
|
Invokes InputStream.read(), appending the bytes to this Bytebuf.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#read(java.io.RandomAccessFile, int)">read</A></B>(java.io.RandomAccessFile file,
|
|
int max_bytes)</CODE>
|
|
|
|
<BR>
|
|
Invokes RandomAccessFile.read(), appending the bytes to this Bytebuf.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>static void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#Recycle(calypso.util.ByteBuf)">Recycle</A></B>(<A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A> aBuf)</CODE>
|
|
|
|
<BR>
|
|
Release a ByteBuf to the recycler.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> boolean</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#regionMatches(boolean, int, byte[], int, int)">regionMatches</A></B>(boolean ignoreCase,
|
|
int toffset,
|
|
byte[] other,
|
|
int ooffset,
|
|
int len)</CODE>
|
|
|
|
<BR>
|
|
Tests if two byte regions are equal.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> boolean</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#regionMatches(boolean, int, calypso.util.ByteBuf, int, int)">regionMatches</A></B>(boolean ignoreCase,
|
|
int toffset,
|
|
<A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A> other,
|
|
int ooffset,
|
|
int len)</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> boolean</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#regionMatches(boolean, int, java.lang.String, int, int)">regionMatches</A></B>(boolean ignoreCase,
|
|
int toffset,
|
|
java.lang.String other,
|
|
int ooffset,
|
|
int len)</CODE>
|
|
|
|
<BR>
|
|
Tests if two byte regions are equal.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> boolean</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#regionMatches(int, byte[], int, int)">regionMatches</A></B>(int toffset,
|
|
byte[] other,
|
|
int ooffset,
|
|
int len)</CODE>
|
|
|
|
<BR>
|
|
Tests if two byte regions are equal.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> boolean</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#regionMatches(int, calypso.util.ByteBuf, int, int)">regionMatches</A></B>(int toffset,
|
|
<A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A> other,
|
|
int ooffset,
|
|
int len)</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> boolean</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#regionMatches(int, java.lang.String, int, int)">regionMatches</A></B>(int toffset,
|
|
java.lang.String other,
|
|
int ooffset,
|
|
int len)</CODE>
|
|
|
|
<BR>
|
|
Tests if two byte regions are equal.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#remove(int)">remove</A></B>(int fromIndex)</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#remove(int, int)">remove</A></B>(int fromIndex,
|
|
int toIndex)</CODE>
|
|
|
|
<BR>
|
|
Remove characters from the ByteBuf starting at fromIndex and up
|
|
to but not including toIndex.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#reverse()">reverse</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Reverse the order of the characters in the String buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#setByteAt(int, byte)">setByteAt</A></B>(int index,
|
|
byte b)</CODE>
|
|
|
|
<BR>
|
|
Changes the byte at the specified index to be ch.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#setLength(int)">setLength</A></B>(int newLength)</CODE>
|
|
|
|
<BR>
|
|
Sets the length of the String.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> byte[]</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#toBytes()">toBytes</A></B>()</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#toInteger()">toInteger</A></B>()</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> java.lang.String</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#toString()">toString</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Converts to a String representing the data in the buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#trim()">trim</A></B>()</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#write(java.io.OutputStream)">write</A></B>(java.io.OutputStream out)</CODE>
|
|
|
|
<BR>
|
|
Writes the contents to the given output stream.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/ByteBuf.html#write(java.io.RandomAccessFile)">write</A></B>(java.io.RandomAccessFile out)</CODE>
|
|
|
|
<BR>
|
|
Writes the contents to the given RandomAccessFile.</TD>
|
|
</TR>
|
|
</TABLE>
|
|
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
|
|
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
|
<TR BGCOLOR="#EEEEFF" ID="TableSubHeadingColor">
|
|
<TD><B>Methods inherited from class java.lang.Object</B></TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD><CODE>clone,
|
|
finalize,
|
|
getClass,
|
|
hashCode,
|
|
notify,
|
|
notifyAll,
|
|
wait,
|
|
wait,
|
|
wait</CODE></TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<P>
|
|
|
|
<!-- ============ FIELD DETAIL =========== -->
|
|
|
|
|
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
|
|
<A NAME="constructor_detail"><!-- --></A>
|
|
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
|
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
|
|
<TD COLSPAN=1><FONT SIZE="+2">
|
|
<B>Constructor Detail</B></FONT></TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<A NAME="ByteBuf()"><!-- --></A><H3>
|
|
ByteBuf</H3>
|
|
<PRE>
|
|
public <B>ByteBuf</B>()</PRE>
|
|
<DL>
|
|
<DD>Constructs an empty String buffer.</DL>
|
|
<HR>
|
|
|
|
<A NAME="ByteBuf(int)"><!-- --></A><H3>
|
|
ByteBuf</H3>
|
|
<PRE>
|
|
public <B>ByteBuf</B>(int length)</PRE>
|
|
<DL>
|
|
<DD>Constructs an empty byte buffer with the specified initial length.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>length</CODE> - the initial length</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="ByteBuf(java.lang.String)"><!-- --></A><H3>
|
|
ByteBuf</H3>
|
|
<PRE>
|
|
public <B>ByteBuf</B>(java.lang.String str)</PRE>
|
|
<DL>
|
|
<DD>Constructs a byte buffer with the specified initial value.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>str</CODE> - the initial value of the buffer</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="ByteBuf(byte[], int, int)"><!-- --></A><H3>
|
|
ByteBuf</H3>
|
|
<PRE>
|
|
public <B>ByteBuf</B>(byte[] bytes,
|
|
int offset,
|
|
int length)</PRE>
|
|
<DL>
|
|
</DL>
|
|
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
|
|
<A NAME="method_detail"><!-- --></A>
|
|
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
|
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
|
|
<TD COLSPAN=1><FONT SIZE="+2">
|
|
<B>Method Detail</B></FONT></TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<A NAME="Alloc()"><!-- --></A><H3>
|
|
Alloc</H3>
|
|
<PRE>
|
|
public static <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A> <B>Alloc</B>()</PRE>
|
|
<DL>
|
|
<DD>Constructs an empty String buffer, reusing one from the
|
|
recycler.</DL>
|
|
<HR>
|
|
|
|
<A NAME="Recycle(calypso.util.ByteBuf)"><!-- --></A><H3>
|
|
Recycle</H3>
|
|
<PRE>
|
|
public static void <B>Recycle</B>(<A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A> aBuf)</PRE>
|
|
<DL>
|
|
<DD>Release a ByteBuf to the recycler. It is up to the caller
|
|
to ensure that buffer is no longer being used otherwise
|
|
unpredicatable program behavior will result.</DL>
|
|
<HR>
|
|
|
|
<A NAME="EmptyRecycler()"><!-- --></A><H3>
|
|
EmptyRecycler</H3>
|
|
<PRE>
|
|
public static void <B>EmptyRecycler</B>()</PRE>
|
|
<DL>
|
|
<DD>Empty the recycler discarding any cached ByteBuf objects</DL>
|
|
<HR>
|
|
|
|
<A NAME="length()"><!-- --></A><H3>
|
|
length</H3>
|
|
<PRE>
|
|
public int <B>length</B>()</PRE>
|
|
<DL>
|
|
<DD>Returns the length (character count) of the buffer.</DL>
|
|
<HR>
|
|
|
|
<A NAME="capacity()"><!-- --></A><H3>
|
|
capacity</H3>
|
|
<PRE>
|
|
public int <B>capacity</B>()</PRE>
|
|
<DL>
|
|
<DD>Returns the current capacity of the String buffer. The capacity
|
|
is the amount of storage available for newly inserted
|
|
characters; beyond which an allocation will occur.</DL>
|
|
<HR>
|
|
|
|
<A NAME="ensureCapacity(int)"><!-- --></A><H3>
|
|
ensureCapacity</H3>
|
|
<PRE>
|
|
public void <B>ensureCapacity</B>(int minimumCapacity)</PRE>
|
|
<DL>
|
|
<DD>Ensures that the capacity of the buffer is at least equal to the
|
|
specified minimum.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>minimumCapacity</CODE> - the minimum desired capacity</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="setLength(int)"><!-- --></A><H3>
|
|
setLength</H3>
|
|
<PRE>
|
|
public void <B>setLength</B>(int newLength)</PRE>
|
|
<DL>
|
|
<DD>Sets the length of the String. If the length is reduced, characters
|
|
are lost. If the length is extended, the values of the new characters
|
|
are set to 0.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>newLength</CODE> - the new length of the buffer<DT><B>Throws:</B><DD>StringIndexOutOfBoundsException - If the length is invalid.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="byteAt(int)"><!-- --></A><H3>
|
|
byteAt</H3>
|
|
<PRE>
|
|
public byte <B>byteAt</B>(int index)</PRE>
|
|
<DL>
|
|
<DD>Returns the byte at the specified index. An index ranges
|
|
from 0..length()-1.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>index</CODE> - the index of the desired character<DT><B>Throws:</B><DD>StringIndexOutOfBoundsException - If the index is invalid.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getBytes(int, int, byte[], int)"><!-- --></A><H3>
|
|
getBytes</H3>
|
|
<PRE>
|
|
public void <B>getBytes</B>(int srcBegin,
|
|
int srcEnd,
|
|
byte[] dst,
|
|
int dstBegin)</PRE>
|
|
<DL>
|
|
<DD>Copies the characters of the specified substring (determined by
|
|
srcBegin and srcEnd) into the character array, starting at the
|
|
array's dstBegin location. Both srcBegin and srcEnd must be legal
|
|
indexes into the buffer.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>srcBegin</CODE> - begin copy at this offset in the String<DD><CODE>srcEnd</CODE> - stop copying at this offset in the String<DD><CODE>dst</CODE> - the array to copy the data into<DD><CODE>dstBegin</CODE> - offset into dst<DT><B>Throws:</B><DD>StringIndexOutOfBoundsException - If there is an invalid index into the buffer.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="setByteAt(int, byte)"><!-- --></A><H3>
|
|
setByteAt</H3>
|
|
<PRE>
|
|
public void <B>setByteAt</B>(int index,
|
|
byte b)</PRE>
|
|
<DL>
|
|
<DD>Changes the byte at the specified index to be ch.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>index</CODE> - the index of the character<DD><CODE>ch</CODE> - the new character<DT><B>Throws:</B><DD>StringIndexOutOfBoundsException - If the index is invalid.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="append(java.lang.Object)"><!-- --></A><H3>
|
|
append</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A> <B>append</B>(java.lang.Object obj)</PRE>
|
|
<DL>
|
|
<DD>Appends an object to the end of this buffer.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>obj</CODE> - the object to be appended<DT><B>Returns:</B><DD>the ByteBuf itself, NOT a new one.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="append(java.lang.String)"><!-- --></A><H3>
|
|
append</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A> <B>append</B>(java.lang.String str)</PRE>
|
|
<DL>
|
|
<DD>Appends a String to the end of this buffer. This just appends one byte
|
|
per char; it strips off the upper 8 bits. If you want the localized
|
|
method of converting chars to bytes, use append(String.getBytes()).<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>str</CODE> - the String to be appended<DT><B>Returns:</B><DD>the ByteBuf itself, NOT a new one.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="append(byte[])"><!-- --></A><H3>
|
|
append</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A> <B>append</B>(byte[] str)</PRE>
|
|
<DL>
|
|
<DD>Appends an array of bytes to the end of this buffer.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>str</CODE> - the characters to be appended<DT><B>Returns:</B><DD>the ByteBuf itself, NOT a new one.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="append(byte[], int, int)"><!-- --></A><H3>
|
|
append</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A> <B>append</B>(byte[] str,
|
|
int offset,
|
|
int len)</PRE>
|
|
<DL>
|
|
<DD>Appends a part of an array of characters to the end of this buffer.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>str</CODE> - the characters to be appended<DD><CODE>offset</CODE> - where to start<DD><CODE>len</CODE> - the number of characters to add<DT><B>Returns:</B><DD>the ByteBuf itself, NOT a new one.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="append(calypso.util.ByteBuf)"><!-- --></A><H3>
|
|
append</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A> <B>append</B>(<A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A> buf)</PRE>
|
|
<DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="append(boolean)"><!-- --></A><H3>
|
|
append</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A> <B>append</B>(boolean b)</PRE>
|
|
<DL>
|
|
<DD>Appends a boolean to the end of this buffer.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>b</CODE> - the boolean to be appended<DT><B>Returns:</B><DD>the ByteBuf itself, NOT a new one.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="append(byte)"><!-- --></A><H3>
|
|
append</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A> <B>append</B>(byte b)</PRE>
|
|
<DL>
|
|
<DD>Appends a byte to the end of this buffer.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>ch</CODE> - the character to be appended<DT><B>Returns:</B><DD>the ByteBuf itself, NOT a new one.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="append(int)"><!-- --></A><H3>
|
|
append</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A> <B>append</B>(int i)</PRE>
|
|
<DL>
|
|
<DD>Appends an integer to the end of this buffer.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>i</CODE> - the integer to be appended<DT><B>Returns:</B><DD>the ByteBuf itself, NOT a new one.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="append(long)"><!-- --></A><H3>
|
|
append</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A> <B>append</B>(long l)</PRE>
|
|
<DL>
|
|
<DD>Appends a long to the end of this buffer.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>l</CODE> - the long to be appended<DT><B>Returns:</B><DD>the ByteBuf itself, NOT a new one.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="append(float)"><!-- --></A><H3>
|
|
append</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A> <B>append</B>(float f)</PRE>
|
|
<DL>
|
|
<DD>Appends a float to the end of this buffer.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>f</CODE> - the float to be appended<DT><B>Returns:</B><DD>the ByteBuf itself, NOT a new one.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="append(double)"><!-- --></A><H3>
|
|
append</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A> <B>append</B>(double d)</PRE>
|
|
<DL>
|
|
<DD>Appends a double to the end of this buffer.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>d</CODE> - the double to be appended<DT><B>Returns:</B><DD>the ByteBuf itself, NOT a new one.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="insert(int, java.lang.Object)"><!-- --></A><H3>
|
|
insert</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A> <B>insert</B>(int offset,
|
|
java.lang.Object obj)</PRE>
|
|
<DL>
|
|
<DD>Inserts an object into the String buffer.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>offset</CODE> - the offset at which to insert<DD><CODE>obj</CODE> - the object to insert<DT><B>Returns:</B><DD>the ByteBuf itself, NOT a new one.<DT><B>Throws:</B><DD>StringIndexOutOfBoundsException - If the offset is invalid.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="insert(int, java.lang.String)"><!-- --></A><H3>
|
|
insert</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A> <B>insert</B>(int offset,
|
|
java.lang.String str)</PRE>
|
|
<DL>
|
|
<DD>Inserts a String into the String buffer.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>offset</CODE> - the offset at which to insert<DD><CODE>str</CODE> - the String to insert<DT><B>Returns:</B><DD>the ByteBuf itself, NOT a new one.<DT><B>Throws:</B><DD>StringIndexOutOfBoundsException - If the offset is invalid.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="insert(int, byte[])"><!-- --></A><H3>
|
|
insert</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A> <B>insert</B>(int offset,
|
|
byte[] str)</PRE>
|
|
<DL>
|
|
<DD>Inserts an array of bytes into the String buffer.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>offset</CODE> - the offset at which to insert<DD><CODE>str</CODE> - the characters to insert<DT><B>Returns:</B><DD>the ByteBuf itself, NOT a new one.<DT><B>Throws:</B><DD>StringIndexOutOfBoundsException - If the offset is invalid.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="insert(int, boolean)"><!-- --></A><H3>
|
|
insert</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A> <B>insert</B>(int offset,
|
|
boolean b)</PRE>
|
|
<DL>
|
|
<DD>Inserts a boolean into the String buffer.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>offset</CODE> - the offset at which to insert<DD><CODE>b</CODE> - the boolean to insert<DT><B>Returns:</B><DD>the ByteBuf itself, NOT a new one.<DT><B>Throws:</B><DD>StringIndexOutOfBoundsException - If the offset is invalid.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="insert(int, byte)"><!-- --></A><H3>
|
|
insert</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A> <B>insert</B>(int offset,
|
|
byte b)</PRE>
|
|
<DL>
|
|
<DD>Inserts a byte into the String buffer.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>offset</CODE> - the offset at which to insert<DD><CODE>ch</CODE> - the character to insert<DT><B>Returns:</B><DD>the ByteBuf itself, NOT a new one.<DT><B>Throws:</B><DD>StringIndexOutOfBoundsException - If the offset invalid.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="insert(int, int)"><!-- --></A><H3>
|
|
insert</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A> <B>insert</B>(int offset,
|
|
int i)</PRE>
|
|
<DL>
|
|
<DD>Inserts an integer into the String buffer.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>offset</CODE> - the offset at which to insert<DD><CODE>i</CODE> - the integer to insert<DT><B>Returns:</B><DD>the ByteBuf itself, NOT a new one.<DT><B>Throws:</B><DD>StringIndexOutOfBoundsException - If the offset is invalid.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="insert(int, long)"><!-- --></A><H3>
|
|
insert</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A> <B>insert</B>(int offset,
|
|
long l)</PRE>
|
|
<DL>
|
|
<DD>Inserts a long into the String buffer.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>offset</CODE> - the offset at which to insert<DD><CODE>l</CODE> - the long to insert<DT><B>Returns:</B><DD>the ByteBuf itself, NOT a new one.<DT><B>Throws:</B><DD>StringIndexOutOfBoundsException - If the offset is invalid.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="insert(int, float)"><!-- --></A><H3>
|
|
insert</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A> <B>insert</B>(int offset,
|
|
float f)</PRE>
|
|
<DL>
|
|
<DD>Inserts a float into the String buffer.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>offset</CODE> - the offset at which to insert<DD><CODE>f</CODE> - the float to insert<DT><B>Returns:</B><DD>the ByteBuf itself, NOT a new one.<DT><B>Throws:</B><DD>StringIndexOutOfBoundsException - If the offset is invalid.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="insert(int, double)"><!-- --></A><H3>
|
|
insert</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A> <B>insert</B>(int offset,
|
|
double d)</PRE>
|
|
<DL>
|
|
<DD>Inserts a double into the String buffer.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>offset</CODE> - the offset at which to insert<DD><CODE>d</CODE> - the double to insert<DT><B>Returns:</B><DD>the ByteBuf itself, NOT a new one.<DT><B>Throws:</B><DD>StringIndexOutOfBoundsException - If the offset is invalid.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="reverse()"><!-- --></A><H3>
|
|
reverse</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A> <B>reverse</B>()</PRE>
|
|
<DL>
|
|
<DD>Reverse the order of the characters in the String buffer.</DL>
|
|
<HR>
|
|
|
|
<A NAME="toString()"><!-- --></A><H3>
|
|
toString</H3>
|
|
<PRE>
|
|
public java.lang.String <B>toString</B>()</PRE>
|
|
<DL>
|
|
<DD>Converts to a String representing the data in the buffer.<DD><DL>
|
|
<DT><B>Overrides:</B><DD>toString in class java.lang.Object</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="toBytes()"><!-- --></A><H3>
|
|
toBytes</H3>
|
|
<PRE>
|
|
public byte[] <B>toBytes</B>()</PRE>
|
|
<DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="equalsIgnoreCase(calypso.util.ByteBuf)"><!-- --></A><H3>
|
|
equalsIgnoreCase</H3>
|
|
<PRE>
|
|
public boolean <B>equalsIgnoreCase</B>(<A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A> anotherString)</PRE>
|
|
<DL>
|
|
<DD>Compares this ByteBuf to another ByteBuf. Returns true if the
|
|
other ByteBuf is equal to this ByteBuf; that is, has the same length
|
|
and the same characters in the same sequence. Upper case
|
|
characters are folded to lower case before they are compared.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>anotherString</CODE> - the String to compare this String against<DT><B>Returns:</B><DD>true if the Strings are equal, ignoring case; false otherwise.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="equals(java.lang.Object)"><!-- --></A><H3>
|
|
equals</H3>
|
|
<PRE>
|
|
public boolean <B>equals</B>(java.lang.Object aObject)</PRE>
|
|
<DL>
|
|
<DD><DL>
|
|
<DT><B>Overrides:</B><DD>equals in class java.lang.Object</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="equals(calypso.util.ByteBuf)"><!-- --></A><H3>
|
|
equals</H3>
|
|
<PRE>
|
|
public boolean <B>equals</B>(<A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A> anotherString)</PRE>
|
|
<DL>
|
|
<DD>Compares this ByteBuf to another ByteBuf. Returns true if the
|
|
other ByteBuf is equal to this ByteBuf; that is, has the same length
|
|
and the same characters in the same sequence.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>anotherString</CODE> - the String to compare this String against<DT><B>Returns:</B><DD>true if the Strings are equal, ignoring case; false otherwise.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="equals(java.lang.String)"><!-- --></A><H3>
|
|
equals</H3>
|
|
<PRE>
|
|
public boolean <B>equals</B>(java.lang.String anotherString)</PRE>
|
|
<DL>
|
|
<DD>Compares this ByteBuf to another String. Returns true if the
|
|
other String is equal to this ByteBuf; that is, has the same length
|
|
and the same characters in the same sequence. (No localization is done;
|
|
if the string doesn't contain 8-bit chars, it won't be equal to this
|
|
ByteBuf.)<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>anotherString</CODE> - the String to compare this String against<DT><B>Returns:</B><DD>true if the Strings are equal, ignoring case; false otherwise.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="regionMatches(int, byte[], int, int)"><!-- --></A><H3>
|
|
regionMatches</H3>
|
|
<PRE>
|
|
public boolean <B>regionMatches</B>(int toffset,
|
|
byte[] other,
|
|
int ooffset,
|
|
int len)</PRE>
|
|
<DL>
|
|
<DD>Tests if two byte regions are equal.
|
|
<p>
|
|
If <code>toffset</code> or <code>ooffset</code> is negative, or
|
|
if <code>toffset</code>+<code>length</code> is greater than the
|
|
length of this ByteBuf, or if
|
|
<code>ooffset</code>+<code>length</code> is greater than the
|
|
length of the argument, then this method returns
|
|
<code>false</code>.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>toffset</CODE> - the starting offset of the subregion in this ByteBuf.<DD><CODE>other</CODE> - the other bytes.<DD><CODE>ooffset</CODE> - the starting offset of the subregion in the argument.<DD><CODE>len</CODE> - the number of bytes to compare.<DT><B>Returns:</B><DD><code>true</code> if the specified subregion of this ByteBuf
|
|
exactly matches the specified subregion of the argument;
|
|
<code>false</code> otherwise.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="regionMatches(boolean, int, byte[], int, int)"><!-- --></A><H3>
|
|
regionMatches</H3>
|
|
<PRE>
|
|
public boolean <B>regionMatches</B>(boolean ignoreCase,
|
|
int toffset,
|
|
byte[] other,
|
|
int ooffset,
|
|
int len)</PRE>
|
|
<DL>
|
|
<DD>Tests if two byte regions are equal.
|
|
<p>
|
|
If <code>toffset</code> or <code>ooffset</code> is negative, or
|
|
if <code>toffset</code>+<code>length</code> is greater than the
|
|
length of this ByteBuf, or if
|
|
<code>ooffset</code>+<code>length</code> is greater than the
|
|
length of the argument, then this method returns
|
|
<code>false</code>.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>ignoreCase</CODE> - if <code>true</code>, ignore case when comparing
|
|
bytes (treating them as characters).<DD><CODE>toffset</CODE> - the starting offset of the subregion in this
|
|
ByteBuf.<DD><CODE>other</CODE> - the other bytes.<DD><CODE>ooffset</CODE> - the starting offset of the subregion in the
|
|
argument.<DD><CODE>len</CODE> - the number of bytes to compare.<DT><B>Returns:</B><DD><code>true</code> if the specified subregion of this ByteBuf
|
|
matches the specified subregion of the argument;
|
|
<code>false</code> otherwise. Whether the matching is exact
|
|
or case insensitive depends on the <code>ignoreCase</code>
|
|
argument.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="regionMatches(int, calypso.util.ByteBuf, int, int)"><!-- --></A><H3>
|
|
regionMatches</H3>
|
|
<PRE>
|
|
public boolean <B>regionMatches</B>(int toffset,
|
|
<A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A> other,
|
|
int ooffset,
|
|
int len)</PRE>
|
|
<DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="regionMatches(boolean, int, calypso.util.ByteBuf, int, int)"><!-- --></A><H3>
|
|
regionMatches</H3>
|
|
<PRE>
|
|
public boolean <B>regionMatches</B>(boolean ignoreCase,
|
|
int toffset,
|
|
<A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A> other,
|
|
int ooffset,
|
|
int len)</PRE>
|
|
<DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="regionMatches(int, java.lang.String, int, int)"><!-- --></A><H3>
|
|
regionMatches</H3>
|
|
<PRE>
|
|
public boolean <B>regionMatches</B>(int toffset,
|
|
java.lang.String other,
|
|
int ooffset,
|
|
int len)</PRE>
|
|
<DL>
|
|
<DD>Tests if two byte regions are equal.
|
|
<p>
|
|
If <code>toffset</code> or <code>ooffset</code> is negative, or
|
|
if <code>toffset</code>+<code>length</code> is greater than the
|
|
length of this ByteBuf, or if
|
|
<code>ooffset</code>+<code>length</code> is greater than the
|
|
length of the argument, then this method returns
|
|
<code>false</code>.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>toffset</CODE> - the starting offset of the subregion in this ByteBuf.<DD><CODE>other</CODE> - the other String.<DD><CODE>ooffset</CODE> - the starting offset of the subregion in the argument.<DD><CODE>len</CODE> - the number of bytes/characters to compare.<DT><B>Returns:</B><DD><code>true</code> if the specified subregion of this ByteBuf
|
|
exactly matches the specified subregion of the String argument;
|
|
<code>false</code> otherwise.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="regionMatches(boolean, int, java.lang.String, int, int)"><!-- --></A><H3>
|
|
regionMatches</H3>
|
|
<PRE>
|
|
public boolean <B>regionMatches</B>(boolean ignoreCase,
|
|
int toffset,
|
|
java.lang.String other,
|
|
int ooffset,
|
|
int len)</PRE>
|
|
<DL>
|
|
<DD>Tests if two byte regions are equal.
|
|
<p>
|
|
If <code>toffset</code> or <code>ooffset</code> is negative, or
|
|
if <code>toffset</code>+<code>length</code> is greater than the
|
|
length of this ByteBuf, or if
|
|
<code>ooffset</code>+<code>length</code> is greater than the
|
|
length of the argument, then this method returns
|
|
<code>false</code>.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>ignoreCase</CODE> - if <code>true</code>, ignore case when comparing
|
|
bytes (treating them as characters).<DD><CODE>toffset</CODE> - the starting offset of the subregion in this
|
|
ByteBuf.<DD><CODE>other</CODE> - the other String.<DD><CODE>ooffset</CODE> - the starting offset of the subregion in the
|
|
String argument.<DD><CODE>len</CODE> - the number of bytes to compare.<DT><B>Returns:</B><DD><code>true</code> if the specified subregion of this ByteBuf
|
|
matches the specified subregion of the String argument;
|
|
<code>false</code> otherwise. Whether the matching is exact
|
|
or case insensitive depends on the <code>ignoreCase</code>
|
|
argument.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="indexOf(int)"><!-- --></A><H3>
|
|
indexOf</H3>
|
|
<PRE>
|
|
public int <B>indexOf</B>(int ch)</PRE>
|
|
<DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="indexOf(int, int)"><!-- --></A><H3>
|
|
indexOf</H3>
|
|
<PRE>
|
|
public int <B>indexOf</B>(int ch,
|
|
int fromIndex)</PRE>
|
|
<DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="remove(int)"><!-- --></A><H3>
|
|
remove</H3>
|
|
<PRE>
|
|
public void <B>remove</B>(int fromIndex)</PRE>
|
|
<DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="remove(int, int)"><!-- --></A><H3>
|
|
remove</H3>
|
|
<PRE>
|
|
public void <B>remove</B>(int fromIndex,
|
|
int toIndex)</PRE>
|
|
<DL>
|
|
<DD>Remove characters from the ByteBuf starting at fromIndex and up
|
|
to but not including toIndex. If toIndex is beyond the length of
|
|
the ByteBuf then it is automatically clamped to the end of the
|
|
ByteBuf. If fromIndex is out of range a StringIndexOutOfBoundsException
|
|
is thrown.</DL>
|
|
<HR>
|
|
|
|
<A NAME="toInteger()"><!-- --></A><H3>
|
|
toInteger</H3>
|
|
<PRE>
|
|
public int <B>toInteger</B>()
|
|
throws java.lang.NumberFormatException</PRE>
|
|
<DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="trim()"><!-- --></A><H3>
|
|
trim</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/ByteBuf.html">ByteBuf</A> <B>trim</B>()</PRE>
|
|
<DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="fullDump(java.io.PrintStream)"><!-- --></A><H3>
|
|
fullDump</H3>
|
|
<PRE>
|
|
public void <B>fullDump</B>(java.io.PrintStream out)</PRE>
|
|
<DL>
|
|
<DD>Write to the given output stream a detailed description of each
|
|
byte in this buffer.</DL>
|
|
<HR>
|
|
|
|
<A NAME="fullDump(java.io.PrintStream, int, int)"><!-- --></A><H3>
|
|
fullDump</H3>
|
|
<PRE>
|
|
public void <B>fullDump</B>(java.io.PrintStream out,
|
|
int start,
|
|
int end)</PRE>
|
|
<DL>
|
|
<DD>Write to the given output stream a detailed description of the given
|
|
bytes in this buffer.</DL>
|
|
<HR>
|
|
|
|
<A NAME="read(java.io.InputStream, int)"><!-- --></A><H3>
|
|
read</H3>
|
|
<PRE>
|
|
public int <B>read</B>(java.io.InputStream file,
|
|
int max_bytes)
|
|
throws java.io.IOException</PRE>
|
|
<DL>
|
|
<DD>Invokes InputStream.read(), appending the bytes to this Bytebuf.<DD><DL>
|
|
<DT><B>Returns:</B><DD>the number of bytes read, or -1 if eof.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="read(java.io.RandomAccessFile, int)"><!-- --></A><H3>
|
|
read</H3>
|
|
<PRE>
|
|
public int <B>read</B>(java.io.RandomAccessFile file,
|
|
int max_bytes)
|
|
throws java.io.IOException</PRE>
|
|
<DL>
|
|
<DD>Invokes RandomAccessFile.read(), appending the bytes to this Bytebuf.
|
|
(A RandomAccessFile is not an InputStream, because Java is a crock.)<DD><DL>
|
|
<DT><B>Returns:</B><DD>the number of bytes read, or -1 if eof.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="write(java.io.OutputStream)"><!-- --></A><H3>
|
|
write</H3>
|
|
<PRE>
|
|
public void <B>write</B>(java.io.OutputStream out)
|
|
throws java.io.IOException</PRE>
|
|
<DL>
|
|
<DD>Writes the contents to the given output stream.</DL>
|
|
<HR>
|
|
|
|
<A NAME="write(java.io.RandomAccessFile)"><!-- --></A><H3>
|
|
write</H3>
|
|
<PRE>
|
|
public void <B>write</B>(java.io.RandomAccessFile out)
|
|
throws java.io.IOException</PRE>
|
|
<DL>
|
|
<DD>Writes the contents to the given RandomAccessFile.</DL>
|
|
<HR>
|
|
|
|
<A NAME="makeInputStream()"><!-- --></A><H3>
|
|
makeInputStream</H3>
|
|
<PRE>
|
|
public java.io.InputStream <B>makeInputStream</B>()</PRE>
|
|
<DL>
|
|
<DD>Creates a new InputStream whose content is this ByteBuf. Note that
|
|
changing the ByteBuf can affect the stream; the data is <i>not</i>
|
|
copied.</DL>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
<HR>
|
|
|
|
<!-- ========== START OF NAVBAR ========== -->
|
|
<A NAME="navbar_bottom"><!-- --></A>
|
|
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
|
<TR>
|
|
<TD COLSPAN=2 BGCOLOR="#EEEEFF" ID="NavBarCell1">
|
|
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
|
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
|
<TR ALIGN="center" VALIGN="top">
|
|
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#FFFFFF" ID="NavBarCell1Rev"> <FONT ID="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
|
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
|
</TR>
|
|
</TABLE>
|
|
</TD>
|
|
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
|
</EM>
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR>
|
|
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../calypso/util/AttributeValuePair.html"><B>PREV CLASS</B></A>
|
|
<A HREF="../../calypso/util/ByteLineBuffer.html"><B>NEXT CLASS</B></A></FONT></TD>
|
|
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A>
|
|
<A HREF="ByteBuf.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
|
|
</TR>
|
|
<TR>
|
|
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
|
|
SUMMARY: INNER | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
|
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
|
|
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
|
</TR>
|
|
</TABLE>
|
|
<!-- =========== END OF NAVBAR =========== -->
|
|
|
|
<HR>
|
|
|
|
</BODY>
|
|
</HTML>
|