public abstract class InputStreamLineListener extends Object implements IInputStreamListener
InputStreamConsumer
to prevent lines content being mixed up.InputStreamConsumer
Constructor and Description |
---|
InputStreamLineListener()
Creates a line listener with UTF-8 character encoding.
|
InputStreamLineListener(Charset charset)
Creates a line listener with supplied character encoding
(defaults to UTF-8 if null).
|
InputStreamLineListener(String charset)
Creates a line listener with supplied character encoding
(defaults to UTF-8 if null).
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
lineStreamed(String type,
String line)
Invoked when a line is streamed.
|
void |
streamed(String type,
byte[] bytes,
int length)
Invoked when a chunk of bytes is streamed.
|
public InputStreamLineListener()
public InputStreamLineListener(Charset charset)
charset
- character encodingpublic InputStreamLineListener(String charset)
charset
- character encodingpublic void streamed(String type, byte[] bytes, int length)
IInputStreamListener
streamed
in interface IInputStreamListener
type
- type of what is being streamed, as defined by the class
using this listenerbytes
- chunk of bytes streamedlength
- length of valid bytes to read or -1 if no more bytes to
readCopyright © 2008–2021 Norconex Inc.. All rights reserved.