public class SimpleBinaryBufferedReaderFactory extends Object implements BufferedReaderFactory
BufferedReaderFactory
useful for reading simple binary (or text)
files with no line endings, such as those produced by mainframe copy books.
The reader splits a stream up across fixed line endings (rather than the
usual convention based on plain text). The line endings are discarded, just
as with the default plain text implementation.Constructor and Description |
---|
SimpleBinaryBufferedReaderFactory() |
Modifier and Type | Method and Description |
---|---|
BufferedReader |
create(org.springframework.core.io.Resource resource,
String encoding)
Create a
BufferedReader for reading String items from the
provided resource. |
void |
setLineEnding(String lineEnding) |
public void setLineEnding(String lineEnding)
lineEnding
- public BufferedReader create(org.springframework.core.io.Resource resource, String encoding) throws UnsupportedEncodingException, IOException
BufferedReaderFactory
BufferedReader
for reading String items from the
provided resource.create
in interface BufferedReaderFactory
resource
- a Resource
containing the data to be readencoding
- the encoding required for converting binary data to
StringBufferedReader
UnsupportedEncodingException
- if the encoding is not supported by
the platformIOException
- if there is a problem creating the readerCopyright © 2014 Pivotal. All rights reserved.