|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| 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 String are extract and stored in an array when creating an 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 ignore. |
|
StringExtractor(File file,
int initSize,
char ignore,
String annotation)
A constructor that reads the lines from file and ignores
those starting with ignore. |
|
StringExtractor(File file,
int initSize,
String annotation)
A constructor that reads the lines from file . |
|
StringExtractor(String content,
int initSize,
char ignore,
String annotation)
A constructor that reads the lines from a String content and
ignores those starting with ignore |
|
StringExtractor(String content,
int initSize,
String annotation)
A constructor that reads the lines from a String content. |
|
| Method Summary | |
|---|---|
String |
getElement(int idx)
Returns String no 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 |
| 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 the can be handled
IOException - is thrown if the file could not be read
FileNotFoundException - is thrown if the file could not be found
public StringExtractor(File file,
int initSize,
char ignore)
throws IOException,
FileNotFoundException
file and ignores
those starting with ignore.
file - the file to be read frominitSize - the initial number of lines the can be handledignore - the first character of lines that should be treated as
comments
IOException - is thrown if the file could not be read
FileNotFoundException - is thrown if the file could not be found
public StringExtractor(File file,
int initSize,
String annotation)
throws IOException,
FileNotFoundException
file .
file - the file to be read frominitSize - the initial number of lines the can be handledannotation - the annotation for the source
IOException - is thrown if the file could not be read
FileNotFoundException - is thrown if the file could not be found
public StringExtractor(File file,
int initSize,
char ignore,
String annotation)
throws IOException,
FileNotFoundException
file and ignores
those starting with ignore.
file - the file to be read frominitSize - the initial number of lines the can be handledignore - the first character of lines that should be treated as
commentsannotation - the annotation for the source
IOException - is thrown if the file could not be read
FileNotFoundException - is thrown if the file could not be found
public StringExtractor(String content,
int initSize,
String annotation)
content.
content - the complete String with all linesinitSize - the initial number of lines the can be handledannotation - some annotation for the content
public StringExtractor(String content,
int initSize,
char ignore,
String annotation)
content and
ignores those starting with ignore
content - the complete String with all linesinitSize - the initial number of lines the 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.
Stringspublic String getElement(int idx)
String no idx that
has been extracted.
idx - the number of the String
String no idx
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||