|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jfw.file.ReadFile
public final class ReadFile
Read a file.
Constructor Summary | |
---|---|
ReadFile(java.lang.String readThisFile)
Create an instance. |
|
ReadFile(java.lang.String path,
java.lang.String readThisFile)
Create an instance. |
Method Summary | |
---|---|
java.lang.String |
getFileToRead()
Get fileToRead attribute. |
void |
readAndWriteBinaryFile(java.io.OutputStream outputStream)
Deprecated. use FileUtils.readAndWriteBinaryFile(com.jfw.file.ReadFile, java.io.OutputStream, com.jfw.util.Encryption) . |
byte[] |
readBinaryFile()
Get the content of the file. |
java.lang.String |
readTextFile()
Get the content of the file. |
void |
setTextEncode(java.lang.String encodeType)
Set attribute encodeType . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReadFile(java.lang.String readThisFile)
readThisFile
- file to read, with absolute path.public ReadFile(java.lang.String path, java.lang.String readThisFile)
path
- path of file to read.readThisFile
- file name.Method Detail |
---|
public java.lang.String getFileToRead()
fileToRead
attribute.
fileToRead
.public void setTextEncode(java.lang.String encodeType)
encodeType
. Encode must be set before call the
method readTextFile()
.
encodeType
- the encode to use.public java.lang.String readTextFile() throws JFWGenericException
JFWGenericException
public byte[] readBinaryFile() throws JFWGenericException
JFWGenericException
public void readAndWriteBinaryFile(java.io.OutputStream outputStream) throws JFWGenericException
FileUtils.readAndWriteBinaryFile(com.jfw.file.ReadFile, java.io.OutputStream, com.jfw.util.Encryption)
.
outputStream
- the stream to write the readed file.
JFWGenericException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |