| 220 | |
| 221 | |
| 222 | uint64_t BinaryReader::ReadBEPointer() |
| 223 | { |
| 224 | uint64_t result; |
| 225 | size_t addressSize = m_view->GetAddressSize(); |
| 226 | switch (addressSize) |
| 227 | { |
| 228 | case 1: |
| 229 | { |
| 230 | uint8_t r; |
| 231 | if (!BNRead8(m_stream, &r)) |
| 232 | throw ReadException(); |
| 233 | result = r; |
| 234 | break; |
| 235 | } |
| 236 | case 2: |
| 237 | { |
| 238 | uint16_t r; |
| 239 | if (!BNReadBE16(m_stream, &r)) |
| 240 | throw ReadException(); |
| 241 | result = r; |
| 242 | break; |
| 243 | } |
| 244 | case 4: |
| 245 | { |
| 246 | uint32_t r; |
| 247 | if (!BNReadBE32(m_stream, &r)) |
| 248 | throw ReadException(); |
| 249 | result = r; |
| 250 | break; |
| 251 | } |
| 252 | case 8: |
| 253 | { |
| 254 | if (!BNReadBE64(m_stream, &result)) |
| 255 | throw ReadException(); |
| 256 | break; |
| 257 | } |
| 258 | default: |
| 259 | { |
| 260 | throw ReadException(); |
| 261 | break; |
| 262 | } |
| 263 | } |
| 264 | return result; |
| 265 | } |
| 266 | |
| 267 | |
| 268 | bool BinaryReader::TryRead(void* dest, size_t len) |
nothing calls this directly
no test coverage detected