|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sdsu.io.ChunkReader
A chunk is any sequence of characters you wish. A chunk could be a single line, a table, or a complete document. The ChunkWriter separates chunks with a string separator, called a chunk seperator. The separator can be any string. The separator is not part of a chunk. The separator should be selected to insure that it does not occur in the input as a part of a chunk, as it will be interpreted as the end of the chunk not as part of the chunk. ChunkWriter will return each chunk one at a time.
Constructor Summary | |
ChunkReader(java.io.Reader in,
java.lang.String separator)
Create a ChunkReader object with a Reader as an input and the given separator. |
|
ChunkReader(java.lang.String input,
java.lang.String separator)
Create a ChunkReader object with a String as an input and the given separator. |
Method Summary | |
boolean |
eof()
Returns true if there are more blocks of data in the input. |
static ChunkReader |
fromFile(java.lang.String fileName,
java.lang.String separator)
Create a ChunkReader object with a file as an input and the given separator. |
boolean |
hasMoreElements()
Returns true if there are more blocks of data in the input. |
java.lang.Object |
nextElement()
Returns the next block of data. |
java.lang.Object |
readChunk()
Returns the next block of data. |
void |
setSeparator(java.lang.String newSeparator)
|
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public ChunkReader(java.io.Reader in, java.lang.String separator)
public ChunkReader(java.lang.String input, java.lang.String separator)
Method Detail |
public static ChunkReader fromFile(java.lang.String fileName, java.lang.String separator) throws java.io.FileNotFoundException
public void setSeparator(java.lang.String newSeparator)
public boolean eof()
public boolean hasMoreElements()
public java.lang.Object readChunk()
public java.lang.Object nextElement()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |