All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sdsu.io.StringizedDataEnumerator

java.lang.Object
   |
   +----sdsu.io.StringizedDataEnumerator

public class StringizedDataEnumerator
extends Object
implements Enumeration
Note: StringizedDataEnumerator is deprecated. Use StringizableReader

Deprecated use StringizableReader.

Version:
0.5 31 August 1997
Author:
Roger Whitney (whitney@cs.sdsu.edu)
See Also:
StringizableReader

Variable Index

 o DEFAULT_COMMENT_CHAR
Default character used at begining of a line to indicate a comment, which ends at the end of line.
 o DEFAULT_DATA_BLOCK_SEPARATOR
Default string that separates data block.
 o DEFAULT_METADATA_CHAR
Default character that indicates a line of metaData when it is the second character of a comment line.
 o META_COMMENT_CHAR_KEY
Name used in file meta data line to indicate the comment character.
 o META_DATA_CHAR_KEY
Name used in file meta data line to indicate the meta data character.
 o META_SEPARATOR_KEY
Name used in file meta data line to indicate the data separator string.

Constructor Index

 o StringizedDataEnumerator(Reader)
Create a StringizedDataEnumerator object with a Reader as an input and the given separator.
 o StringizedDataEnumerator(String)
Create a StringizedDataEnumerator object with a String as an input and the given separator.

Method Index

 o fromFile(String)
Create a StringizedDataEnumerator object with a file as an input and the given separator.
 o getDataComment()
Return the comment for the current data object
 o getDataLabel()
Returns the label for the current data object.
 o getMetaDataComment()
Return the comment for the metaData of the current data object
 o hasMoreElements()
Returns true if there are more blocks of data in the input.
 o nextElement()
Returns the next block of data.
 o setSeparator(String)

Variables

 o META_SEPARATOR_KEY
 public static final String META_SEPARATOR_KEY
Name used in file meta data line to indicate the data separator string.

 o META_COMMENT_CHAR_KEY
 public static final String META_COMMENT_CHAR_KEY
Name used in file meta data line to indicate the comment character.

 o META_DATA_CHAR_KEY
 public static final String META_DATA_CHAR_KEY
Name used in file meta data line to indicate the meta data character.

 o DEFAULT_COMMENT_CHAR
 public static final char DEFAULT_COMMENT_CHAR
Default character used at begining of a line to indicate a comment, which ends at the end of line.

 o DEFAULT_METADATA_CHAR
 public static final char DEFAULT_METADATA_CHAR
Default character that indicates a line of metaData when it is the second character of a comment line.

 o DEFAULT_DATA_BLOCK_SEPARATOR
 public static final String DEFAULT_DATA_BLOCK_SEPARATOR
Default string that separates data block.

Constructors

 o StringizedDataEnumerator
 public StringizedDataEnumerator(Reader in) throws IOException
Create a StringizedDataEnumerator object with a Reader as an input and the given separator. This class does not buffer the reader for you.

 o StringizedDataEnumerator
 public StringizedDataEnumerator(String input) throws IOException
Create a StringizedDataEnumerator object with a String as an input and the given separator.

Methods

 o fromFile
 public static StringizedDataEnumerator fromFile(String fileName) throws FileNotFoundException, IOException
Create a StringizedDataEnumerator object with a file as an input and the given separator. File IO will be buffered for you.

Throws: FileNotFoundException
thrown if fileName is not valid file name.
 o setSeparator
 public void setSeparator(String newSeparator)
 o getMetaDataComment
 public String getMetaDataComment()
Return the comment for the metaData of the current data object

 o getDataComment
 public String getDataComment()
Return the comment for the current data object

 o getDataLabel
 public String getDataLabel()
Returns the label for the current data object. Returns empty string, not null, if no label exists

 o hasMoreElements
 public boolean hasMoreElements()
Returns true if there are more blocks of data in the input.

 o nextElement
 public Object nextElement()
Returns the next block of data.

Throws: NoSuchElementException
if there are no blocks of data left.

All Packages  Class Hierarchy  This Package  Previous  Next  Index