I'm receiving byte arrays (actually, netty's ByteBufs) from underlying network layer in pipeline handler object like this:
class Handler {
...
private SAXParser parser = ...;
private ContentHandler handler = ...;
void process(byte[] request) {
parser.parse(???, handler);
}
}
Handler.process()
is called multiple times per request (as the data arrives from network). How can I feed data to parser without buffering requests into single huge data unit?