code: public static int parseInt(byte[] bytes) {
          int result = 0;
          for (byte aByte : bytes) {
              if (aByte == ' ') return result;
  
              result *= 10;
              result += (aByte - (byte) '0');
          }
  
          return result;
      }
docs: parses only positive numbers
  
  @param bytes   bytes of string value
  @return integer value