int j = paramParserCursor.getPos();
int k = paramParserCursor.getUpperBound();
skipWhitespace(paramCharArrayBuffer, paramParserCursor);
int m = paramParserCursor.getPos();
if (m + i + 4 > k)
throw new ParseException("Not a valid protocol version: " + paramCharArrayBuffer.substring(j, k));
int n = 1;
for (int i1 = 0; (n != 0) && (i1 < i); i1++)
n = paramCharArrayBuffer.charAt(m + i1) == str.charAt(i1) ? 1 : 0;
if (n != 0)
n = paramCharArrayBuffer.charAt(m + i) == '/' ? 1 : 0;
if (n == 0)
throw new ParseException("Not a valid protocol version: " + paramCharArrayBuffer.substring(j, k));
m += i + 1;
i1 = paramCharArrayBuffer.indexOf(46, m, k);
if (i1 == -1)
throw new ParseException("Invalid protocol version number: " + paramCharArrayBuffer.substring(j, k));
int i2;
try
{
i2 = Integer.parseInt(paramCharArrayBuffer.substringTrimmed(m, i1));
}
catch (NumberFormatException localNumberFormatException1)
{
throw new ParseException("Invalid protocol major version number: " + paramCharArrayBuffer.substring(j, k));
}
m = i1 + 1;
int i3 = paramCharArrayBuffer.indexOf(32, m, k);
if (i3 == -1)
i3 = k;
int i4;
try
{
i4 = Integer.parseInt(paramCharArrayBuffer.substringTrimmed(m, i3));
}
catch (NumberFormatException localNumberFormatException2)
{
throw new ParseException("Invalid protocol minor version number: " + paramCharArrayBuffer.substring(j, k));
}
paramParserCursor.updatePos(i3);
return createProtocolVersion(i2, i4);
}