(reader: &mut BlockReader, _: &ClassFragment)
| 40 | } |
| 41 | |
| 42 | fn read_magic_bytes(reader: &mut BlockReader, _: &ClassFragment) -> Result<ClassFragment, Error> { |
| 43 | match reader.read_u32() { |
| 44 | Ok(0xCAFEBABE) => Ok(ClassFragment::default()), |
| 45 | _ => Err(Error::new(ErrorKind::InvalidData, "Invalid magic bytes")) |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | fn read_classfile_version(reader: &mut BlockReader, _: &ClassFragment) -> Result<ClassFragment, Error> { |
| 50 | match (reader.read_u16(), reader.read_u16()) { |