FileDocCategorySizeDatePackage
StringCharBuffer.javaAPI DocJava SE 5 API2146Fri Aug 26 14:57:10 BST 2005java.nio

StringCharBuffer

public class StringCharBuffer extends CharBuffer

Fields Summary
CharSequence
str
Constructors Summary
StringCharBuffer(CharSequence s, int start, int end)

 // package-private
	super(-1, start, end, s.length());
	int n = s.length();
	if ((start < 0) || (start > n) || (end < start) || (end > n))
	    throw new IndexOutOfBoundsException();
	str = s;
    
private StringCharBuffer(CharSequence s, int mark, int pos, int limit, int cap)

	super(mark, pos, limit, cap);
	str = s;
    
Methods Summary
public java.nio.CharBufferasReadOnlyBuffer()

	return duplicate();
    
public final java.nio.CharBuffercompact()

	throw new ReadOnlyBufferException();
    
public java.nio.CharBufferduplicate()

	return new StringCharBuffer(str, markValue(),
				    position(), limit(), capacity());
    
public final charget()

	return str.charAt(nextGetIndex());
    
public final charget(int index)

	return str.charAt(checkIndex(index));
    
public booleanisDirect()

	return false;
    
public final booleanisReadOnly()

	return true;
    
public java.nio.ByteOrderorder()

	return ByteOrder.nativeOrder();
    
public final java.nio.CharBufferput(char c)

	throw new ReadOnlyBufferException();
    
public final java.nio.CharBufferput(int index, char c)

	throw new ReadOnlyBufferException();
    
public java.nio.CharBufferslice()

	return new StringCharBuffer(str, position(), limit());
    
public final java.lang.CharSequencesubSequence(int start, int end)

	try {
	    int pos = position();
	    return new StringCharBuffer(str,
					pos + checkIndex(start, pos),
					pos + checkIndex(end, pos));
	} catch (IllegalArgumentException x) {
	    throw new IndexOutOfBoundsException();
	}
    
final java.lang.StringtoString(int start, int end)

	return str.toString().substring(start, end);