public class StringExtractor extends AbstractStringExtractor
Strings from either a
File or a String. Internally the Strings are
extracted and stored in an array when creating a new instance.annotation, FASTA, ignore, ignorePattern, USUALLY| Constructor and Description |
|---|
StringExtractor(File file,
int initSize)
A constructor that reads the lines from
file. |
StringExtractor(File file,
int initSize,
char ignore)
A constructor that reads the lines from
file and ignores
those starting with the comment character ignore. |
StringExtractor(File file,
int initSize,
char ignore,
String annotation)
A constructor that reads the lines from
file, ignores those
starting with the comment character ignore and sets the
annotation of the source to annotation. |
StringExtractor(File file,
int initSize,
String annotation)
A constructor that reads the lines from
file and sets the
annotation of the source to annotation. |
StringExtractor(String content,
int initSize,
char ignore,
String annotation)
A constructor that reads the lines from a
String
content, ignores those starting with the comment character
ignore and sets the annotation of the source to
annotation. |
StringExtractor(String content,
int initSize,
String annotation)
A constructor that reads the lines from a
String
content and sets the annotation of the source to
annotation. |
| Modifier and Type | Method and Description |
|---|---|
String |
getElement(int idx)
Returns
String number idx that has been extracted. |
int |
getNumberOfElements()
Returns the number of
Strings that have been read. |
boolean |
hasMoreElements() |
String |
nextElement() |
getAnnotation, getCurrentSequenceAnnotationspublic StringExtractor(File file, int initSize) throws IOException, FileNotFoundException
file.file - the File to be read frominitSize - the initial number of lines that can be handledIOException - if the File could not be readFileNotFoundException - if the File could not be foundStringExtractor(File, int, char)public StringExtractor(File file, int initSize, char ignore) throws IOException, FileNotFoundException
file and ignores
those starting with the comment character ignore.file - the File to be read frominitSize - the initial number of lines that can be handledignore - the first character of lines that should be treated as
commentsIOException - if the File could not be readFileNotFoundException - if the File could not be foundStringExtractor(File, int, char, String)public StringExtractor(File file, int initSize, String annotation) throws IOException, FileNotFoundException
file and sets the
annotation of the source to annotation.file - the File to be read frominitSize - the initial number of lines that can be handledannotation - the annotation for the sourceIOException - if the File could not be readFileNotFoundException - if the File could not be foundStringExtractor(File, int, char, String)public StringExtractor(File file, int initSize, char ignore, String annotation) throws IOException, FileNotFoundException
file, ignores those
starting with the comment character ignore and sets the
annotation of the source to annotation.file - the File to be read frominitSize - the initial number of lines that can be handledignore - the first character of lines that should be treated as
commentsannotation - the annotation for the sourceIOException - if the File could not be readFileNotFoundException - if the File could not be foundpublic StringExtractor(String content, int initSize, String annotation)
String
content and sets the annotation of the source to
annotation.content - the complete String with all linesinitSize - the initial number of lines that can be handledannotation - some annotation for the contentStringExtractor(String, int, char, String)public StringExtractor(String content, int initSize, char ignore, String annotation)
String
content, ignores those starting with the comment character
ignore and sets the annotation of the source to
annotation.content - the complete String with all linesinitSize - the initial number of lines that can be handledignore - the first character of lines that should be treated as
commentsannotation - some annotation for the content