org.glassfish.pfl.basic.tools.file
Class BlockParser

java.lang.Object
  extended by org.glassfish.pfl.basic.tools.file.BlockParser

public class BlockParser
extends Object

Utility class used to convert FileWrappers into (lists of) Blocks.


Field Summary
static String COMMENT_BLOCK_TAG
           
 
Method Summary
static Block getBlock(FileWrapper fw)
          Return the contents of the text file as a Block.
static List<Block> parseBlocks(FileWrapper fw, String prefix)
          Transform fw into a list of blocks.
static List<Block> parseBlocks(FileWrapper fw, String start, String end)
          Transform fw into a list of blocks.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMMENT_BLOCK_TAG

public static final String COMMENT_BLOCK_TAG
See Also:
Constant Field Values
Method Detail

getBlock

public static Block getBlock(FileWrapper fw)
                      throws IOException
Return the contents of the text file as a Block.

Throws:
IOException

parseBlocks

public static List<Block> parseBlocks(FileWrapper fw,
                                      String prefix)
                               throws IOException
Transform fw into a list of blocks. There are two types of blocks in this list, and they always alternate:

parseBlocks

public static List<Block> parseBlocks(FileWrapper fw,
                                      String start,
                                      String end)
                               throws IOException
Transform fw into a list of blocks. There are two types of blocks in this list, and they always alternate:


Copyright © 2013 Oracle. All Rights Reserved.