Rewrited pipe in Java