hello/hello.rs
1use std::{fs::File, io, io::Read, path::Path};
2
3use classfmt::ClassParser;
4
5fn main() -> io::Result<()> {
6 let mut f = File::open(Path::new("./tests/Fields.class"))?;
7 let mut buf = Vec::with_capacity(64);
8 f.read_to_end(&mut buf)?;
9
10 let class = ClassParser::from_bytes(&buf).parse().unwrap();
11
12 println!("{:#?}", class);
13 Ok(())
14}