| 47 | } |
| 48 | |
| 49 | fn read_classfile_version(reader: &mut BlockReader, _: &ClassFragment) -> Result<ClassFragment, Error> { |
| 50 | match (reader.read_u16(), reader.read_u16()) { |
| 51 | (Ok(minor_version), Ok(major_version)) => { |
| 52 | Ok(ClassFragment { |
| 53 | version: Some(ClassfileVersion::new(major_version, minor_version)), |
| 54 | ..Default::default() |
| 55 | }) |
| 56 | }, |
| 57 | _ => Err(Error::new(ErrorKind::UnexpectedEof, "Could not read classfile version number")) |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | fn read_constant_pool(reader: &mut BlockReader, _: &ClassFragment) -> Result<ClassFragment, Error> { |
| 62 | match reader.read_u16() { |