public class CharSequenceSource extends java.lang.Object implements Source, java.io.Serializable
| Constructor and Description | 
|---|
CharSequenceSource(java.lang.CharSequence source)
Constructs the CharSequenceSource. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
char | 
charAt(int arg0)  | 
void | 
close()
Closes the source. 
 | 
void | 
deepClose()
Does a deep close of all sources and subsources associated with this
 source. 
 | 
Source | 
fromActualPosition()
Creates a sub source starting from the actual position. 
 | 
int | 
getEnd()  | 
int | 
getPos()  | 
int | 
getPosition()
Get the actual read position of the source. 
 | 
java.lang.CharSequence | 
getSource()  | 
int | 
getStart()  | 
boolean | 
isEOF()
Checks if the end of the Source is reached. 
 | 
int | 
length()  | 
char | 
next()
Returns the character at the given position and increases the position. 
 | 
void | 
seek(int position)
Seek to the given position 
 | 
void | 
setEnd(int end)  | 
void | 
setPos(int pos)  | 
void | 
setSource(java.lang.CharSequence source)  | 
void | 
setStart(int start)  | 
java.lang.CharSequence | 
subSequence(int start,
           int end)  | 
Source | 
subSource(int start,
         int end)
Creates a sub source of this source. 
 | 
java.lang.String | 
toString()  | 
public CharSequenceSource(java.lang.CharSequence source)
source - public Source subSource(int start, int end)
SourcesubSource in interface Sourcestart - the start positionend - the end positionSource.subSource(int, int)public java.lang.CharSequence subSequence(int start,
                                          int end)
subSequence in interface java.lang.CharSequenceCharSequence.subSequence(int, int)public Source fromActualPosition()
SourcefromActualPosition in interface SourceSource.fromActualPosition()public int getPosition()
SourcegetPosition in interface SourceSource.getPosition()public void seek(int position)
          throws java.io.IOException
Sourceseek in interface Sourcejava.io.IOExceptionSource.seek(int)public char next()
          throws java.io.IOException
Sourcenext in interface Sourcejava.io.IOExceptionSource.next()public int length()
length in interface java.lang.CharSequenceCharSequence.length()public char charAt(int arg0)
charAt in interface java.lang.CharSequenceCharSequence.charAt(int)public java.lang.String toString()
toString in interface java.lang.CharSequencetoString in class java.lang.ObjectObject.toString()public boolean isEOF()
SourceisEOF in interface Sourcetrue if the end of the source is reachedSource.isEOF()public void close()
           throws java.io.IOException
Sourceclose in interface Sourcejava.io.IOExceptionSource.close()public void deepClose()
               throws java.io.IOException
SourcedeepClose in interface Sourcejava.io.IOExceptionSource.deepClose()public int getEnd()
public void setEnd(int end)
end - The end to set.public int getPos()
public void setPos(int pos)
pos - The pos to set.public java.lang.CharSequence getSource()
public void setSource(java.lang.CharSequence source)
source - The source to set.public int getStart()
public void setStart(int start)
start - The start to set.Copyright © 2021. All Rights Reserved.