code: public int parseIntegerString(String numberString) {
          StringReader sr = new StringReader(numberString);
          StreamTokenizer st = new StreamTokenizer(sr);
          st.parseNumbers();
          int tokenType;
          int returnValue = 0;
  
          try {
              if ((tokenType = st.nextToken()) != StreamTokenizer.TT_EOF) {
                  if (tokenType == StreamTokenizer.TT_NUMBER) {
                      returnValue = (int) st.nval;
                  }
              }
          }
          catch (IOException e) {
              Log.e(TAG, "Error: parseIntegerString - " + e);
          }
          return returnValue;
      }
docs: end parseBooleanString