|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.jstacs.io.AbstractStringExtractor
de.jstacs.io.StringExtractor
public class StringExtractor
This class implements the reader that extracts Strings from either a
File or a String. Internally the Strings are
extracted and stored in an array when creating a new instance.
| Field Summary |
|---|
| Fields inherited from class de.jstacs.io.AbstractStringExtractor |
|---|
annotation, FASTA, ignore, ignorePattern, USUALLY |
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class de.jstacs.io.AbstractStringExtractor |
|---|
getAnnotation, getCurrentSequenceAnnotations |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StringExtractor(File file,
int initSize)
throws IOException,
FileNotFoundException
file.
file - the File to be read frominitSize - the initial number of lines that can be handled
IOException - if the File could not be read
FileNotFoundException - 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
comments
IOException - if the File could not be read
FileNotFoundException - 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 source
IOException - if the File could not be read
FileNotFoundException - 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 source
IOException - if the File could not be read
FileNotFoundException - 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| Method Detail |
|---|
public String nextElement()
public boolean hasMoreElements()
public int getNumberOfElements()
Strings that have been read.
Strings that have been readpublic String getElement(int idx)
String number idx that has been extracted.
idx - the number of the String
String number idx
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||