org.eclipse.emf.ecore.xmi.impl
Class StringSegment
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
org.eclipse.emf.common.util.AbstractEList<E>
org.eclipse.emf.common.util.BasicEList<StringSegment.Element>
org.eclipse.emf.ecore.xmi.impl.StringSegment
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<StringSegment.Element>, java.util.Collection<StringSegment.Element>, java.util.List<StringSegment.Element>, java.util.RandomAccess, EList<StringSegment.Element>
- Direct Known Subclasses:
- XMLString
public class StringSegment
- extends BasicEList<StringSegment.Element>
A String Buffer that never reallocates
- See Also:
- Serialized Form
Fields inherited from class java.util.AbstractList |
modCount |
Methods inherited from class org.eclipse.emf.common.util.BasicEList |
addAllUnique, addAllUnique, addAllUnique, addAllUnique, addUnique, addUnique, assign, basicGet, basicList, clear, clone, contains, data, get, grow, indexOf, isEmpty, lastIndexOf, move, primitiveGet, remove, setData, setUnique, shrink, size, toArray, toArray |
Methods inherited from class org.eclipse.emf.common.util.AbstractEList |
add, add, addAll, addAll, basicIterator, basicListIterator, basicListIterator, canContainNull, didAdd, didChange, didClear, didMove, didRemove, didSet, equalObjects, equals, getDuplicates, getNonDuplicates, hashCode, isUnique, listIterator, move, remove, removeAll, resolve, retainAll, set, toString, useEquals, validate |
Methods inherited from class java.util.AbstractList |
removeRange, subList |
Methods inherited from class java.util.AbstractCollection |
containsAll |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
containsAll, subList |
LIST_SIZE
protected static final int LIST_SIZE
- See Also:
- Constant Field Values
ELEMENT_SIZE
protected static final int ELEMENT_SIZE
- See Also:
- Constant Field Values
BUFFER_SIZE
protected static final int BUFFER_SIZE
- See Also:
- Constant Field Values
segmentCapacity
protected int segmentCapacity
outputbytes
protected byte[] outputbytes
outputchars
protected char[] outputchars
buffer
protected char[] buffer
cursor
protected StringSegment.Element cursor
cursorIndex
protected int cursorIndex
lineSeparator
protected java.lang.String lineSeparator
temporaryFileName
protected java.lang.String temporaryFileName
temporaryFile
protected java.io.Writer temporaryFile
bufferPosition
protected int bufferPosition
StringSegment
public StringSegment()
StringSegment
public StringSegment(int minimumCapacity)
StringSegment
public StringSegment(int minimumCapacity,
int segmentCapacity)
StringSegment
public StringSegment(java.lang.String temporaryFileName)
setTemporaryFileName
public void setTemporaryFileName(java.lang.String tempFile)
getTemporaryFileName
public java.lang.String getTemporaryFileName()
newData
protected java.lang.Object[] newData(int capacity)
- Description copied from class:
BasicEList
- Returns new allocated data storage.
Clients may override this to create typed storage.
The cost of type checking via a typed array is negligible.
- Overrides:
newData
in class BasicEList<StringSegment.Element>
- Returns:
- new data storage.
reset
public void reset()
add
public void add(java.lang.String newString)
addLine
public void addLine()
mark
public java.lang.Object mark()
startFileBuffering
public void startFileBuffering()
resetToMark
public void resetToMark(java.lang.Object mark)
getLength
public int getLength()
getChars
public int getChars(char[] destination,
int position)
writeAscii
public void writeAscii(java.io.OutputStream os,
int flushThreshold)
throws java.io.IOException
- Throws:
java.io.IOException
write
@Deprecated
public void write(java.io.OutputStreamWriter os,
int flushThreshold)
throws java.io.IOException
- Deprecated. since 2.2 - Instead use #write(Writer, int)
- Parameters:
os
- flushThreshold
-
- Throws:
java.io.IOException
write
public void write(java.io.Writer os,
int flushThreshold)
throws java.io.IOException
- Throws:
java.io.IOException
iterator
public java.util.Iterator<StringSegment.Element> iterator()
- Description copied from class:
AbstractEList
- Returns an iterator.
This implementation allocates a
AbstractEList.EIterator
.
- Specified by:
iterator
in interface java.lang.Iterable<StringSegment.Element>
- Specified by:
iterator
in interface java.util.Collection<StringSegment.Element>
- Specified by:
iterator
in interface java.util.List<StringSegment.Element>
- Overrides:
iterator
in class AbstractEList<StringSegment.Element>
- Returns:
- an iterator.
- See Also:
AbstractEList.EIterator
listIterator
public java.util.ListIterator<StringSegment.Element> listIterator()
- Description copied from class:
AbstractEList
- Returns a list iterator.
This implementation allocates a
AbstractEList.EListIterator
.
- Specified by:
listIterator
in interface java.util.List<StringSegment.Element>
- Overrides:
listIterator
in class AbstractEList<StringSegment.Element>
- Returns:
- a list iterator.
- See Also:
AbstractEList.EListIterator
stringIterator
public java.util.Iterator<java.lang.String> stringIterator()