Writing Service In Java