public final class LargeStringBuffer
extends java.lang.Object
implements java.lang.CharSequence, java.io.Serializable
?????? |
---|
LargeStringBuffer()
Create an empty LargeStringBuffer with default space allocation
|
LargeStringBuffer(int minAllocation,
int maxAllocation)
Create an empty LargeStringBuffer
|
?????? | ????? |
---|---|
void |
append(java.lang.CharSequence data)
Append a CharSequence to this LargeStringBuffer
|
char |
charAt(int index)
Returns the character at the specified index.
|
void |
dumpDataStructure()
Produce diagnostic dump
|
boolean |
equals(java.lang.Object other)
Compare equality
|
int |
hashCode()
Generate a hash code
|
int |
length()
Returns the length of this character sequence.
|
java.lang.CharSequence |
subSequence(int start,
int end)
Returns a new character sequence that is a subsequence of this sequence.
|
java.lang.String |
substring(int start,
int end)
Returns a new character sequence that is a subsequence of this sequence.
|
java.lang.String |
toString()
Convert to a string
|
void |
write(java.io.Writer writer)
Write the value to a writer
|
public LargeStringBuffer()
public LargeStringBuffer(int minAllocation, int maxAllocation)
minAllocation
- initial allocation size for each segment (including the first). If minAllocation
exceeds maxAllocation, it is rounded down to the value of maxAllocationmaxAllocation
- maximum allocation size for each segment. When a segment reaches this
size, a new segment is created rather than appending more characters to the existing segment.
However, a segment may have size greater than maxAllocation if the data is appended in a single chunk
of size maxAllocation.public void append(java.lang.CharSequence data)
data
- the data to be appendedpublic int length()
length
???? java.lang.CharSequence
public char charAt(int index)
charAt
???? java.lang.CharSequence
index
- the index of the character to be returnedjava.lang.IndexOutOfBoundsException
- if the index argument is negative or not less than
length()public java.lang.CharSequence subSequence(int start, int end)
subSequence
???? java.lang.CharSequence
start
- the start index, inclusiveend
- the end index, exclusivejava.lang.IndexOutOfBoundsException
- if start or end are negative,
if end is greater than length(),
or if start is greater than endpublic java.lang.String toString()
toString
???? java.lang.CharSequence
toString
??? java.lang.Object
public boolean equals(java.lang.Object other)
equals
??? java.lang.Object
public int hashCode()
hashCode
??? java.lang.Object
public java.lang.String substring(int start, int end)
start
- index of the first character to be includedend
- index of the character after the last one to be includedpublic void write(java.io.Writer writer) throws java.io.IOException
writer
- the writer to which the value is to be writtenjava.io.IOException
public void dumpDataStructure()