public CharArray valueCharArray() throws IllegalStateException, IOException {
        if (isEmpty) {
            if(LOG.isTrace()) {
                LOG.trace("LightXmlPullIterator.valueCharArray()", "isEmpty, returning null");
            }
            return null;
        }
        //checkNotParsed(); better throw exception is try to parse it twice
        if (wasParsed) {
            if(LOG.isTrace()) {
                LOG.trace("LightXmlPullIterator.valueCharArray()", "wasParsed, returning null");
            }
            return null;
        }
        if (reader.isTextType()) {
            if(LOG.isTrace()) {
                LOG.trace("LightXmlPullIterator.valueCharArray()", "isTextType");
            }
            //return the spaces read by isTextType() plus all the chars till 
            //delimiter (can be only '<')
            reader.pushText('<');
            isWhitespace = false; 
            return reader.charArray;
        } else {
            if(LOG.isTrace()) {
                LOG.trace("LightXmlPullIterator.valueCharArray()", "!isTextType is whitespace");
            }
            //return the spaces read by isTextType()
            isWhitespace = true; 
            return reader.charArray;//is whitespaces
            //return null //if whitespaces are not needed anyway
        }
    }