public static int get_num_songs(H5File h5) { H5CompoundDS metadata; try { metadata = (H5CompoundDS) h5.get("/metadata/songs"); metadata.init(); return metadata.getHeight(); } catch (Exception e) { e.printStackTrace(); return -1; } }