public abstract static class IO.ReadStageBase<SOURCE,STAGE extends IO.ReadStageBase> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Charset |
charset
Used when there are reader/inputstream or writer/outputstream conversion,
|
protected Object |
hint |
protected SOURCE |
source |
protected String |
sourceName |
| Constructor and Description |
|---|
ReadStageBase(SOURCE source) |
| Modifier and Type | Method and Description |
|---|---|
STAGE |
contentType(MimeType type) |
STAGE |
contentType(String contentType) |
STAGE |
encoding(Charset charset)
Specify the encoding
Charset when there are inputstream/reader or outputstream/writer conversion. |
protected void |
ensureCloseSource() |
STAGE |
hint(Object hint) |
protected abstract InputStream |
load() |
protected STAGE |
me() |
protected String |
sourceName() |
STAGE |
sourceName(String name) |
<T> T |
to(BeanInfo beanInfo) |
<T> T |
to(Class<T> type) |
<T> T |
to(TypeReference typeReference) |
byte[] |
toByteArray() |
InputStream |
toInputStream() |
List<String> |
toLine(int limit) |
List<String> |
toLines() |
Properties |
toProperties() |
Reader |
toReader() |
ISObject |
toSObject() |
String |
toString() |
protected <T> T |
toUnknownType(Type type) |
protected SOURCE source
protected String sourceName
protected Object hint
protected Charset charset
Used when there are reader/inputstream or writer/outputstream conversion,
public ReadStageBase(SOURCE source)
public STAGE encoding(Charset charset)
Specify the encoding Charset when there are inputstream/reader or outputstream/writer conversion.
charset - the charset to be used to encode byte array into stringpublic ISObject toSObject()
public Reader toReader()
public Properties toProperties()
public InputStream toInputStream()
public byte[] toByteArray()
public <T> T to(Class<T> type)
public <T> T to(BeanInfo beanInfo)
public <T> T to(TypeReference typeReference)
protected abstract InputStream load() throws IOException
IOExceptionprotected void ensureCloseSource()
protected STAGE me()
protected <T> T toUnknownType(Type type)
protected String sourceName()
Copyright © 2014–2019 OSGL (Open Source General Library). All rights reserved.