return new Position() { int off = offset;
if (offset < 0 || offset > length()) throw new BadLocationException("The offset was out of the bounds of this" + " buffer", offset);
  public Position createPosition(final int offset) throws BadLocationException  {    return new Position()      {	int off = offset;	public int getOffset()	{	  return off;	}      };  }