edu.jhu.ece.iacl.jist.io
Class StringReaderWriter

java.lang.Object
  extended by edu.jhu.ece.iacl.jist.io.FileReaderWriter<java.lang.String>
      extended by edu.jhu.ece.iacl.jist.io.StringReaderWriter

public class StringReaderWriter
extends FileReaderWriter<java.lang.String>

The Class StringReaderWriter.


Field Summary
protected static StringReaderWriter readerWriter
          The Constant readerWriter.
 
Fields inherited from class edu.jhu.ece.iacl.jist.io.FileReaderWriter
extensionFilter, fileName
 
Constructor Summary
StringReaderWriter()
          Instantiates a new string reader writer.
StringReaderWriter(FileExtensionFilter f)
          Instantiates a new string reader writer.
 
Method Summary
static StringReaderWriter getInstance()
          Gets the single instance of StringReaderWriter.
protected  java.lang.String readObject(java.io.File f)
          Read object.
protected  boolean writeObject(java.lang.String str, java.io.File f)
          writeObject should be overwritten by all extending classes This method is protected because users should call write() From there, other reader/writer methods (including this one) are called as needed.
 
Methods inherited from class edu.jhu.ece.iacl.jist.io.FileReaderWriter
accept, getExtensionFilter, getFileExtension, getFileExtension, getFileName, getFileName, getFileName, getFullFileName, read, setExtensionFilter, setFileName, write, writeObjectToDirectory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

readerWriter

protected static final StringReaderWriter readerWriter
The Constant readerWriter.

Constructor Detail

StringReaderWriter

public StringReaderWriter()
Instantiates a new string reader writer.


StringReaderWriter

public StringReaderWriter(FileExtensionFilter f)
Instantiates a new string reader writer.

Parameters:
f - the f
Method Detail

getInstance

public static StringReaderWriter getInstance()
Gets the single instance of StringReaderWriter.

Returns:
single instance of StringReaderWriter

readObject

protected java.lang.String readObject(java.io.File f)
Description copied from class: FileReaderWriter
Read object.

Specified by:
readObject in class FileReaderWriter<java.lang.String>
Parameters:
f - the f
Returns:
the t

writeObject

protected boolean writeObject(java.lang.String str,
                              java.io.File f)
Description copied from class: FileReaderWriter
writeObject should be overwritten by all extending classes This method is protected because users should call write() From there, other reader/writer methods (including this one) are called as needed.

Specified by:
writeObject in class FileReaderWriter<java.lang.String>
Parameters:
str - The object being written
f - Where the file should be written
Returns:
true if successful, false otherwise