write Indentation to ByteArrayOutputStream - Java XML

Java examples for XML:XML String Output

Description

write Indentation to ByteArrayOutputStream

Demo Code

/*/*from   w ww  . j  a  va  2  s  .c o  m*/
 * Copyright (C) 2002-2015 FlyMine
 *
 * This code may be freely distributed and modified under the
 * terms of the GNU Lesser General Public Licence.  This should
 * be distributed with the code.  See the LICENSE file for more
 * information or http://www.gnu.org/copyleft/lesser.html.
 *
 */
//package com.java2s;
import java.io.ByteArrayOutputStream;

public class Main {
    private static void writeIndentation(ByteArrayOutputStream os,
            int indent) {
        for (int j = 0; j < indent; j++) {
            os.write(' ');
            os.write(' ');
        }
    }
}

Related Tutorials