この PHP コードを Java コードに変換するにはどうすればよいですか?
protected function readInt24()
{
$ret = 0;
if (strlen($this->_input) >= 3)
{
$ret = ord(substr($this->_input, 0, 1)) << 16;
$ret |= ord(substr($this->_input, 1, 1)) << 8;
$ret |= ord(substr($this->_input, 2, 1)) << 0;
$this->_input = substr($this->_input, 3);
}
return $ret;
}
$input は、utf 文字を含む非常にクレイジーな文字列です (afaik): �8� 程度