com.ctc.wstx.io
Class CharArraySource

java.lang.Object
  extended bycom.ctc.wstx.io.WstxInputSource
      extended bycom.ctc.wstx.io.BaseInputSource
          extended bycom.ctc.wstx.io.CharArraySource

public final class CharArraySource
extends BaseInputSource

Input source that reads input from a static char array, usually used when expanding internal entities.


Field Summary
 
Fields inherited from class com.ctc.wstx.io.BaseInputSource
mBuffer, mInputLen
 
Fields inherited from class com.ctc.wstx.io.WstxInputSource
mParent
 
Method Summary
 void close()
           
 int getInputBufferLength()
           
 void initInputLocation(WstxInputData reader)
          Unlike with reader source, we won't start from beginning of a file, but usually from somewhere in the middle...
 int readInto(WstxInputData reader)
          Method called to read at least one more char from input source, and update input data appropriately.
 boolean readMore(WstxInputData reader, int minAmount)
          Method called by reader when it has to have at least specified number of consequtive input characters in its buffer, and it currently does not have.
 
Methods inherited from class com.ctc.wstx.io.BaseInputSource
getLocation, getLocation, getPublicId, getSource, getSystemId, restoreContext, saveContext
 
Methods inherited from class com.ctc.wstx.io.WstxInputSource
getParent, hasRecursion, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getInputBufferLength

public int getInputBufferLength()
Specified by:
getInputBufferLength in class BaseInputSource
Returns:
Length of suggested input buffer (if source needs one); used for passing default buffer size down the input source line.

initInputLocation

public void initInputLocation(WstxInputData reader)
Unlike with reader source, we won't start from beginning of a file, but usually from somewhere in the middle...

Specified by:
initInputLocation in class BaseInputSource

readInto

public int readInto(WstxInputData reader)
Description copied from class: WstxInputSource
Method called to read at least one more char from input source, and update input data appropriately.

Specified by:
readInto in class BaseInputSource

readMore

public boolean readMore(WstxInputData reader,
                        int minAmount)
Description copied from class: WstxInputSource
Method called by reader when it has to have at least specified number of consequtive input characters in its buffer, and it currently does not have. If so, it asks input source to do whatever it has to do to try to get more data, if possible (including moving stuff in input buffer if necessary and possible).

Specified by:
readMore in class BaseInputSource

close

public void close()
Specified by:
close in class BaseInputSource