Package org.noggit
Class CharArr
- java.lang.Object
-
- org.noggit.CharArr
-
- All Implemented Interfaces:
Appendable,CharSequence
public class CharArr extends Object implements CharSequence, Appendable
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Appendableappend(char c)Appendableappend(CharSequence csq)Appendableappend(CharSequence csq, int start, int end)intcapacity()The capacity of the buffer when empty (getArray().size())charcharAt(int index)voidclose()intfill()voidflush()char[]getArray()intgetEnd()intgetStart()intlength()intread()intread(char[] cbuf, int off, int len)intread(CharBuffer cb)voidreserve(int num)voidreset()protected voidresize(int len)voidset(char[] arr, int start, int end)voidsetEnd(int end)voidsetStart(int start)intsize()CharArrsubSequence(int start, int end)char[]toCharArray()StringtoString()voidunsafeWrite(char b)voidunsafeWrite(char[] b, int off, int len)voidunsafeWrite(int b)voidwrite(char b)voidwrite(char[] b)voidwrite(char[] b, int off, int len)voidwrite(int b)voidwrite(String s)voidwrite(String s, int stringOffset, int len)voidwrite(CharArr arr)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.CharSequence
chars, codePoints
-
-
-
-
Method Detail
-
setStart
public void setStart(int start)
-
setEnd
public void setEnd(int end)
-
set
public void set(char[] arr, int start, int end)
-
getArray
public char[] getArray()
-
getStart
public int getStart()
-
getEnd
public int getEnd()
-
size
public int size()
-
length
public int length()
- Specified by:
lengthin interfaceCharSequence
-
capacity
public int capacity()
The capacity of the buffer when empty (getArray().size())
-
charAt
public char charAt(int index)
- Specified by:
charAtin interfaceCharSequence
-
subSequence
public CharArr subSequence(int start, int end)
- Specified by:
subSequencein interfaceCharSequence
-
read
public int read() throws IOException- Throws:
IOException
-
read
public int read(char[] cbuf, int off, int len)
-
unsafeWrite
public void unsafeWrite(char b)
-
unsafeWrite
public void unsafeWrite(int b)
-
unsafeWrite
public void unsafeWrite(char[] b, int off, int len)
-
resize
protected void resize(int len)
-
reserve
public void reserve(int num)
-
write
public void write(char b)
-
write
public final void write(int b)
-
write
public final void write(char[] b)
-
write
public void write(char[] b, int off, int len)
-
write
public final void write(CharArr arr)
-
write
public final void write(String s)
-
write
public void write(String s, int stringOffset, int len)
-
flush
public void flush()
-
reset
public final void reset()
-
close
public void close()
-
toCharArray
public char[] toCharArray()
-
toString
public String toString()
- Specified by:
toStringin interfaceCharSequence- Overrides:
toStringin classObject
-
read
public int read(CharBuffer cb) throws IOException
- Throws:
IOException
-
fill
public int fill() throws IOException- Throws:
IOException
-
append
public final Appendable append(CharSequence csq) throws IOException
- Specified by:
appendin interfaceAppendable- Throws:
IOException
-
append
public Appendable append(CharSequence csq, int start, int end) throws IOException
- Specified by:
appendin interfaceAppendable- Throws:
IOException
-
append
public final Appendable append(char c) throws IOException
- Specified by:
appendin interfaceAppendable- Throws:
IOException
-
-