Package com.sissi.commons.apache

Examples of com.sissi.commons.apache.LineIterator


    ByteArrayOutputStream source = new ByteArrayOutputStream();
    BufferedOutputStream buffer = new BufferedOutputStream(source);
    try {
      marshaller.marshal(node, buffer);
      buffer.flush();
      LineIterator iterator = IOUtil.lineIterator(new ByteArrayInputStream(source.toByteArray()), "UTF-8");
      LinkedList<String> contents = new LinkedList<String>();
      while (iterator.hasNext()) {
        String each = iterator.next().trim();
        if (!each.isEmpty()) {
          contents.add(each);
        }
      }
      return contents;
View Full Code Here

TOP

Related Classes of com.sissi.commons.apache.LineIterator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.