类 SimpleBinaryBufferedReaderFactory
- java.lang.Object
- org.springframework.batch.item.file.SimpleBinaryBufferedReaderFactory
- 所有已实现的接口:
BufferedReaderFactory
public class SimpleBinaryBufferedReaderFactory extends java.lang.Object implements BufferedReaderFactory
ABufferedReaderFactory
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.- 从以下版本开始:
- 2.1
- 作者:
- Dave Syer
构造器概要
构造器 构造器 说明 SimpleBinaryBufferedReaderFactory()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 java.io.BufferedReader
create(org.springframework.core.io.Resource resource, java.lang.String encoding)
Create aBufferedReader
for reading String items from the provided resource.void
setLineEnding(java.lang.String lineEnding)
构造器详细资料
SimpleBinaryBufferedReaderFactory
public SimpleBinaryBufferedReaderFactory()
方法详细资料
setLineEnding
public void setLineEnding(java.lang.String lineEnding)
- 参数:
lineEnding
-String
indicating what defines the end of a "line".
create
public java.io.BufferedReader create(org.springframework.core.io.Resource resource, java.lang.String encoding) throws java.io.UnsupportedEncodingException, java.io.IOException
从接口复制的说明:BufferedReaderFactory
Create aBufferedReader
for reading String items from the provided resource.- 指定者:
create
在接口中BufferedReaderFactory
- 参数:
resource
- aResource
containing the data to be readencoding
- the encoding required for converting binary data to String- 返回:
- a
BufferedReader
- 抛出:
java.io.UnsupportedEncodingException
- if the encoding is not supported by the platformjava.io.IOException
- if there is a problem creating the reader