public class SnippetReader extends Object
| Constructor and Description |
|---|
SnippetReader(URL src)
Constructor.
|
SnippetReader(URL src,
String encoding)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
isDemarcator(String snippetId,
String what,
String line)
Determines if the given line is a demarcator.
|
protected boolean |
isEnd(String snippetId,
String line)
Determines if the given line is an end demarcator.
|
protected boolean |
isStart(String snippetId,
String line)
Determines if the given line is a start demarcator.
|
StringBuffer |
readSnippet(String snippetId)
Reads the snippet with given id.
|
public SnippetReader(URL src, String encoding)
src - The sourceencoding - The file encodingpublic SnippetReader(URL src)
src - The sourcepublic StringBuffer readSnippet(String snippetId) throws IOException
snippetId - The id of the snippet.IOException - if something goes wrong.protected boolean isStart(String snippetId, String line)
snippetId - the id of the snippet.line - the line.protected boolean isDemarcator(String snippetId, String what, String line)
snippetId - the id of the snippet.what - Identifier for the demarcator.line - the line.Copyright © 2005–2014 The Apache Software Foundation. All rights reserved.