Gets the text.

@param position
the position, where to begin
@param len
the length of text portion
@return the text
541361
protected String getTextEx(int position, int len)
    {
        try {
            return getDocument().getText(position, len);
        } catch (BadLocationException e) {
            e.printStackTrace();
            return "";
        }
    }
197019
@Override
  public int positionedRead(long pos, byte[] b, int off, int len) throws IOException {
    return positionedReadInternal(pos, b, off, len);
  }
58654
public final int readTTFUShort(long pos) throws IOException {
        long cp = getCurrentPos();
        seekSet(pos);
        int ret = readTTFUShort();
        seekSet(cp);
        return ret;
    }
724596
public String getLine(int pos) {
        try {
            if (!findLine(pos))
                return null;

            int lineEnd = lineStart;
            while (lineEnd < bufLen && buf[lineEnd] != CR && buf[lineEnd] != LF)
                lineEnd++;
            if (lineEnd - lineStart == 0)
                return null;
            return new String(buf, lineStart, lineEnd - lineStart);
        } finally {
            buf = null;
        }
    }
22047
@Override
	public long getBits(int position, int length) {
		if (position < 0) throw new IllegalArgumentException("negative position");
		int limit = position + length;
		if (limit > size) throw new IllegalArgumentException("length too great");
		// contained in extensions
		if (position >= start || limit < finish) return extensionBits(length);
		// contained in store
		if (position >= finish && limit <= start) return store.getBits(position - finish, length);
		// overlaps extensions and store
		return super.getBits(position, length);
	}
57055
public static boolean recog(final String text, final int start, final int len){
        if(!RECOGNITION_TOOL_ENABLED){
            return false;
        }
        return isEnglishAndNumberMix(text, start, len) 
                || isFraction(text, start, len)
                || isQuantifier(text, start, len)
                || isChineseNumber(text, start, len);
    }
600847
def get_character(self, position, offset=0):
        """"""
        position = self.get_position(position) + offset
        cursor = self.textCursor()
        cursor.movePosition(QTextCursor.End)
        if position < cursor.position():
            cursor.setPosition(position)
            cursor.movePosition(QTextCursor.Right,
                                QTextCursor.KeepAnchor)
            return to_text_string(cursor.selectedText())
        else:
            return ''
1131438
public final String getFixString(final int pos, final int len, String charsetName) {
        if (pos + len > limit || pos < 0) throw new IllegalArgumentException("limit excceed: "
                                                                             + (pos < 0 ? pos : (pos + len)));

        final int from = origin + pos;
        final int end = from + len;
        byte[] buf = buffer;
        int found = from;
        for (; (found < end) && buf[found] != '\0'; found++)
            /* empty loop */;

        try {
            return new String(buf, from, found - from, charsetName);
        } catch (UnsupportedEncodingException e) {
            throw new IllegalArgumentException("Unsupported encoding: " + charsetName, e);
        }
    }
504658
public static boolean isNumber(final String text, final int start, final int len){
        for(int i=start; i<start+len; i++){
            char c = text.charAt(i);
            if(!isNumber(c)){
                return false;
            }
        }
        //指定的字符串已经识别为数字串
        //下面要判断数字串是否完整
        if(start>0){
            //判断前一个字符，如果为数字字符则识别失败
            char c = text.charAt(start-1);
            if(isNumber(c)){
                return false;
            }
        }
        if(start+len < text.length()){
            //判断后一个字符，如果为数字字符则识别失败
            char c = text.charAt(start+len);
            if(isNumber(c)){
                return false;
            }
        }
        if(LOGGER.isDebugEnabled()) {
            LOGGER.debug("识别出数字：" + text.substring(start, start + len));
        }
        return true;
    }
456292
public Promise<ByteBuf> read(long position) {
		long size;

		try {
			size = channel.size();
		} catch (IOException e) {
			return Promise.ofException(e);
		}

		ByteBuf buf = ByteBufPool.allocate((int) (size - position));
		return read(buf, position)
				.whenException($ -> buf.recycle())
				.map($ -> buf);
	}
313838
public Cursor getItem(int position) {
        if (mDataValid && mCursor != null) {
            mCursor.moveToPosition(position);
            return mCursor;
        } else {
            return null;
        }
    }
477950
private int getByte(int position) {
    if (position + 1 >= length) {
      throw new IllegalStateException("Malformed DN: " + dn);
    }

    int b1, b2;

    b1 = chars[position];
    if (b1 >= '0' && b1 <= '9') {
      b1 = b1 - '0';
    } else if (b1 >= 'a' && b1 <= 'f') {
      b1 = b1 - 87; // 87 = 'a' - 10
    } else if (b1 >= 'A' && b1 <= 'F') {
      b1 = b1 - 55; // 55 = 'A' - 10
    } else {
      throw new IllegalStateException("Malformed DN: " + dn);
    }

    b2 = chars[position + 1];
    if (b2 >= '0' && b2 <= '9') {
      b2 = b2 - '0';
    } else if (b2 >= 'a' && b2 <= 'f') {
      b2 = b2 - 87; // 87 = 'a' - 10
    } else if (b2 >= 'A' && b2 <= 'F') {
      b2 = b2 - 55; // 55 = 'A' - 10
    } else {
      throw new IllegalStateException("Malformed DN: " + dn);
    }

    return (b1 << 4) + b2;
  }
371407
public Set<Integer> getFullEndPositionList(int docId, int position)
      throws IOException {
    if (ignoreSpans != null && docId == currentDocId) {
      if (position < minimumPosition) {
        throw new IOException(
            "Unexpected startPosition, should be >= " + minimumPosition + "!");
      } else {
        computeFullEndPositionList(position);
        return fullEndPositionList.get(position);
      }
    } else {
      return null;
    }
  }
1239908
public <V> V convertFrom(final char[] text, final int start, final int len) {
        if (text == null) return null;
        final JsonReader in = readerPool.get();
        in.setText(text, start, len);
        Object rs = new AnyDecoder(factory).convertFrom(in);
        readerPool.accept(in);
        return (V) rs;
    }
638749
public static String getAt(String list, String delimiter, int position, boolean ignoreEmpty, String defaultValue) {
	if (delimiter.length() == 1) return getAt(list, delimiter.charAt(0), position, ignoreEmpty, defaultValue);
	int len = list.length();

	if (len == 0) return defaultValue;
	int last = -1;
	int count = -1;

	char[] del = delimiter.toCharArray();
	char c;
	for (int i = 0; i < len; i++) {
	    c = list.charAt(i);
	    for (int y = 0; y < del.length; y++) {
		if (c == del[y]) {
		    if (ignoreEmpty && (last + 1) == i) {
			last = i;
			break;
		    }

		    count++;
		    if (count == position) {
			return list.substring(last + 1, i);
		    }
		    last = i;
		    break;
		}
	    }
	}

	if (position == count + 1) {
	    if (!ignoreEmpty || last + 1 < len) return list.substring(last + 1);
	}
	return defaultValue;
    }
205934
public static String getAt(String list, char delimiter, int position, boolean ignoreEmpty, String defaultValue) {
	int len = list.length();
	if (len == 0) return defaultValue;
	int last = -1;
	int count = -1;

	for (int i = 0; i < len; i++) {
	    // char == delimiter
	    if (list.charAt(i) == delimiter) {
		if (ignoreEmpty && (last + 1) == i) {
		    last = i;
		    continue;
		}

		count++;
		if (count == position) {
		    return list.substring(last + 1, i);
		}
		last = i;
	    }
	}

	if (position == count + 1) {
	    if (!ignoreEmpty || last + 1 < len) return list.substring(last + 1);
	}
	return defaultValue;
    }
606978
public function getCharAt( $position )
	{
		if($position <= $this->count() && $position >= 0 )
			$character = $this->buffer[$position];
		return $character;
	}