@Override
   public int read() throws IOException
   {
      int result;

      if (index == data.length())
      {
         result = -1;
      }
      else
      {
         result = data.charAt(index++);
      }

      return result;
   }