Constructor and Description |
---|
CharOutputSink()
Creates class instance with default charset encoding..
|
CharOutputSink(Charset charset)
Creates class instance with specified charset encoding.
|
CharOutputSink(String charsetName)
Creates class instance with specified charset name.
|
Modifier and Type | Method and Description |
---|---|
void |
connect(File file)
Redirects output to specified file
|
void |
connect(OutputStream outputStream)
Redirects output to specified stream
|
void |
connect(Writer writer)
Redirects output to specified writer
|
void |
endStream()
Callback for end stream event.
|
CharOutputSink |
process(char ch)
Callback for char processing
|
CharOutputSink |
process(char[] buffer,
int start,
int count)
Callback for buffer processing
|
CharOutputSink |
process(String str)
Callback for string processing
|
void |
setBaseUri(String baseUri)
Sets document base URI.
|
boolean |
setProperty(String key,
Object value)
Key-value based settings.
|
void |
startStream()
Callback for start stream event.
|
public CharOutputSink()
public CharOutputSink(Charset charset)
charset
- charsetpublic CharOutputSink(String charsetName)
charsetName
- charset namepublic void connect(File file)
file
- output filepublic void connect(Writer writer)
writer
- output writerpublic void connect(OutputStream outputStream)
outputStream
- output streampublic CharOutputSink process(String str) throws ParseException
CharSink
process
in interface CharSink
str
- string for processingParseException
public CharOutputSink process(char ch) throws ParseException
CharSink
process
in interface CharSink
ch
- char for processingParseException
public CharOutputSink process(char[] buffer, int start, int count) throws ParseException
CharSink
process
in interface CharSink
buffer
- char buffer for processingstart
- position to startcount
- count of chars to processParseException
public void setBaseUri(String baseUri)
DataSink
setBaseUri
in interface DataSink
baseUri
- base URIpublic void startStream() throws ParseException
DataSink
startStream
in interface DataSink
ParseException
public void endStream() throws ParseException
DataSink
endStream
in interface DataSink
ParseException
public boolean setProperty(String key, Object value)
DataSink
setProperty
in interface DataSink
key
- property keyvalue
- property valueCopyright © 2012–2013. All rights reserved.