investigate, if using java.nio would improve metrics-lib