public final class ModelStreamFactory extends Object
ModelReader
,
ModelWriter
Modifier and Type | Method and Description |
---|---|
static ModelStreamFactory |
getInstance(boolean jsonCompatible)
Returns DMR stream factory instance.
|
ModelReader |
newModelReader(InputStream stream)
Creates new DMR reader with
UTF-8 character set. |
ModelReader |
newModelReader(InputStream stream,
Charset charset)
Creates new DMR reader with specified character set.
|
ModelReader |
newModelReader(Reader reader)
Creates new DMR reader.
|
ModelWriter |
newModelWriter(OutputStream stream)
Creates new DMR writer with
UTF-8 character set. |
ModelWriter |
newModelWriter(OutputStream stream,
Charset charset)
Creates new DMR writer with specified character set.
|
ModelWriter |
newModelWriter(Writer writer)
Creates new DMR writer.
|
public static ModelStreamFactory getInstance(boolean jsonCompatible)
jsonCompatible
- whether stream factories should read/write JSONpublic ModelReader newModelReader(Reader reader)
reader
- inputpublic ModelWriter newModelWriter(Writer writer)
writer
- outputpublic ModelReader newModelReader(InputStream stream)
UTF-8
character set.stream
- inputpublic ModelWriter newModelWriter(OutputStream stream)
UTF-8
character set.stream
- outputpublic ModelReader newModelReader(InputStream stream, Charset charset)
stream
- inputcharset
- character setpublic ModelWriter newModelWriter(OutputStream stream, Charset charset)
stream
- outputcharset
- character setCopyright © 2017 JBoss by Red Hat. All rights reserved.