com.notuvy.file
Class FileContent

java.lang.Object
  extended by com.notuvy.file.FileContent

public class FileContent
extends Object

A utility to save string content to a file, and to extract the string content from a file.

Author:
murali

Nested Class Summary
static interface FileContent.LineHandler
           
static interface FileContent.WriterHandler
           
 
Field Summary
protected static org.apache.log4j.Logger LOG
           
 
Constructor Summary
FileContent(File pDestination)
           
FileContent(File pParent, String pName)
           
 
Method Summary
 boolean fileExists()
           
 File getDestination()
           
 boolean readLines(FileContent.LineHandler pHandler)
           
 String readString()
           
 boolean save(FileContent.WriterHandler pHandler)
           
 boolean save(Object pContent)
           
 String toString()
           
 boolean transferTo(Writer pWriter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LOG

protected static final org.apache.log4j.Logger LOG
Constructor Detail

FileContent

public FileContent(File pParent,
                   String pName)

FileContent

public FileContent(File pDestination)
Method Detail

getDestination

public File getDestination()

fileExists

public boolean fileExists()

save

public boolean save(Object pContent)

readString

public String readString()

transferTo

public boolean transferTo(Writer pWriter)
                   throws IOException
Throws:
IOException

readLines

public boolean readLines(FileContent.LineHandler pHandler)

save

public boolean save(FileContent.WriterHandler pHandler)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013. All Rights Reserved.