Java tutorial
//package com.java2s; //License from project: Open Source License import org.springframework.util.FileCopyUtils; import java.io.*; public class Main { /** * Print xml to System.out. * * @param xml XML */ public static void println(byte[] xml) throws Exception { FileCopyUtils.copy(new InputStreamReader(new ByteArrayInputStream(xml), "utf8"), new PrintWriter(System.out)); System.out.println(); System.out.flush(); } }