StringSource constructor bug
Brought to you by:
derrickoswald
When you instance a new StringSource(myString) and the String != null, then the offset = 0
Actually the constructor looks like this:
public StringSource (String string, String character_set)
{
mString = (null == string) ? "" : string;
mOffset = 0
mEncoding = character_set;
mMark = -1;
}
I sugguest just do this
public StringSource (String string, String character_set)
{
mString = (null == string) ? "" : string;
mOffset = mString.length()
mEncoding = character_set;
mMark = -1;
}
Logged In: YES
user_id=2005873
Originator: YES
Hi, looking again the in some cases the mOffset must be initialized in 0, but other cases must be the length of the source.
If you try to user Page.getText(), this methods uses StringSource.offset() that return mOffset. in the other hand if you use StringSource.ready() method it will return false, if the mOffset is the source string length.
Please take a look carefully.
If need some clarify contactme.