|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SimpleFileWriter
Simple file accessor interface.
It's too much of a bother to treat file resources in Java.
This module offers simple interface to treat file resources.
It is able to access os file system resource(using string file path value) or
access ClassPathResource object.
Method Summary | |
---|---|
String |
getEncoding()
Get encoding. |
String |
getLineBreak()
Get line break. |
String |
getWriteTarget()
Get write target absolute file path. |
SimpleFileWriter |
setEncoding(String encoding)
Set encoding. |
SimpleFileWriter |
setLineBreak(String lineBreak)
Set line break. |
SimpleFileWriter |
setWriteTarget(ClassPathResource resourcePath)
Set write target. |
SimpleFileWriter |
setWriteTarget(File file)
Set write target. |
SimpleFileWriter |
setWriteTarget(String path)
Set write target. |
void |
write(byte[] content)
Write file with byte array. |
void |
write(List<String> lines)
Write file with String List. |
void |
write(String strContent)
Write file with String. |
void |
write(String[] lines)
Write file with String array. |
Method Detail |
---|
void write(String[] lines) throws IOException
lines
- String array contents
IOException
- cannot write filevoid write(List<String> lines) throws IOException
lines
- String List contents
IOException
- cannot write filevoid write(String strContent) throws IOException
strContent
- String contents
IOException
- cannot write filevoid write(byte[] content) throws IOException
content
- byte array contents
IOException
- cannot write fileString getWriteTarget()
SimpleFileWriter setWriteTarget(String path)
path
- write target file pathSimpleFileWriter setWriteTarget(ClassPathResource resourcePath)
resourcePath
- write target resource pathSimpleFileWriter setWriteTarget(File file)
file
- write target fileString getLineBreak()
SimpleFileWriter setLineBreak(String lineBreak)
lineBreak
- line breakString getEncoding()
SimpleFileWriter setEncoding(String encoding)
encoding
- specified encoding
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |