305306307308309310311312313314315
} else if(frame != null) { frameWriter.setValue(frame); buffer.clear(); int length = frameWriter.writeToBuffer(buffer); _connection.sendMessage(_buffer,0,length); } } if(_frameSource.closed() && _connection.isOpen()) {
584585586587588589590591592593594
while(!frameSource.closed()) { if(!writer.isComplete()) { writer.writeToBuffer(buf); } while(buf.hasRemaining()) {
594595596597598599600601602603604
if((frame = frameSource.getNextFrame(buf.position()==0)) != null) { writer.setValue(frame); int size = writer.writeToBuffer(buf); } else { break;
306307308309310311312313314315316
260261262263264265266267268269270
int count; do { count = writer.writeToBuffer(buf); out.write(buf.array(), buf.arrayOffset(), count); buf.clear(); } while (!writer.isComplete()); }
276277278279280281282283284285286