|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SimpleFileReader
Simple file reader 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 | |
---|---|
Integer |
getDefaultArrayLength()
Get default array length to buffering. |
String |
getEncodingToRead()
Get encoding to read. |
byte[] |
read2ByteArray(ClassPathResource resourcePath)
Read resource content(convert to byte array). |
byte[] |
read2ByteArray(File file)
Read file content(convert to byte array). |
byte[] |
read2ByteArray(String path)
Read file content(convert to byte array). |
char[] |
read2CharArray(ClassPathResource resourcePath)
Read resource content(convert to char array). |
char[] |
read2CharArray(File file)
Read file content(convert to char array). |
char[] |
read2CharArray(String path)
Read file content(convert to char array). |
String[] |
read2StringLineArray(ClassPathResource resourcePath)
Read resource content(convert to String array). |
String[] |
read2StringLineArray(File file)
Read file content(convert to String array). |
String[] |
read2StringLineArray(String path)
Read file content(convert to String array). |
List<String> |
read2StringLineList(ClassPathResource resourcePath)
Read resource content(convert to String List). |
List<String> |
read2StringLineList(File file)
Read file content(convert to String List). |
List<String> |
read2StringLineList(String path)
Read file content(convert to String List). |
SimpleFileReader |
setDefaultArrayLength(Integer defaultArrayLength)
Set default array length to buffering. |
SimpleFileReader |
setEncodingToRead(String encodingToRead)
Set encoding to read. |
Method Detail |
---|
char[] read2CharArray(String path) throws IOException
path
- readable file resource of file path
IOException
- file read errorchar[] read2CharArray(ClassPathResource resourcePath) throws IOException
resourcePath
- readable class path resource
IOException
char[] read2CharArray(File file) throws IOException
file
- readable file object
IOException
- file read errorbyte[] read2ByteArray(String path) throws IOException
path
- readable file resource of file path
IOException
- file read errorbyte[] read2ByteArray(ClassPathResource resourcePath) throws IOException
resourcePath
- readable class path resource
IOException
byte[] read2ByteArray(File file) throws IOException
file
- readable file object
IOException
- file read errorList<String> read2StringLineList(String path) throws IOException
path
- readable file resource of file path
IOException
- file read errorList<String> read2StringLineList(ClassPathResource resourcePath) throws IOException
resourcePath
- readable class path resource
IOException
List<String> read2StringLineList(File file) throws IOException
file
- readable file object
IOException
- file read errorString[] read2StringLineArray(String path) throws IOException
path
- readable file resource of file path
IOException
- file read errorString[] read2StringLineArray(ClassPathResource resourcePath) throws IOException
resourcePath
- readable class path resource
IOException
String[] read2StringLineArray(File file) throws IOException
file
- readable file object
IOException
- file read errorString getEncodingToRead()
SimpleFileReader setEncodingToRead(String encodingToRead)
encodingToRead
- encoding
Integer getDefaultArrayLength()
SimpleFileReader setDefaultArrayLength(Integer defaultArrayLength)
defaultArrayLength
- default array length to buffering
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |