try out some Java API and make Write a trait