@Override protected int gatheringFlush(Buffer header, ByteBuffer bbuf0, Buffer buffer, ByteBuffer bbuf1) throws IOException { int headerPosition = header.getIndex(); int headerLength = header.length(); int bufferPosition = buffer.getIndex(); int written = super.gatheringFlush(header, bbuf0, buffer,bbuf1); notifyOutgoing(header, headerPosition, written > headerLength ? headerLength : written); notifyOutgoing(buffer, bufferPosition, written > headerLength ? written - headerLength : 0); return written; }
@Override protected int gatheringFlush(Buffer header, ByteBuffer bbuf0, Buffer buffer, ByteBuffer bbuf1) throws IOException { int headerPosition = header.getIndex(); int headerLength = header.length(); int bufferPosition = buffer.getIndex(); int written = super.gatheringFlush(header, bbuf0, buffer,bbuf1); notifyOutgoing(header, headerPosition, written > headerLength ? headerLength : written); notifyOutgoing(buffer, bufferPosition, written > headerLength ? written - headerLength : 0); return written; }
@Override public int flush(Buffer buffer) throws IOException { int position = buffer.getIndex(); int written = super.flush(buffer); notifyOutgoing(buffer, position, written); return written; }
@Override public int flush(Buffer buffer) throws IOException { int position = buffer.getIndex(); int written = super.flush(buffer); notifyOutgoing(buffer, position, written); return written; }
@Override public int flush(Buffer buffer) throws IOException { int position = buffer.getIndex(); int written = super.flush(buffer); notifyOutgoing(buffer, position, written); return written; }
@Override public int flush(Buffer buffer) throws IOException { int position = buffer.getIndex(); int written = super.flush(buffer); notifyOutgoing(buffer, position, written); return written; }
public static Buffer getHeaderName(Buffer _buffer, View tok) { int len=((_buffer.peek()&0xFF)<<8)|(_buffer.peek(_buffer.getIndex()+1)&0xFF); if ((0xFF00&len)==0xA000) { _buffer.skip(1); return Ajp13RequestHeaders.CACHE.get(_buffer.get()); } int start=_buffer.getIndex(); tok.update(start+2,start+len+2); _buffer.skip(len+3); return tok; }
public InputStream getInputStream() throws IOException { Buffer indirect = getIndirectBuffer(); if (indirect!=null && indirect.array()!=null) return new ByteArrayInputStream(indirect.array(),indirect.getIndex(),indirect.length()); return _resource.getInputStream(); }
public InputStream getInputStream() throws IOException { Buffer indirect = getIndirectBuffer(); if (indirect!=null && indirect.array()!=null) return new ByteArrayInputStream(indirect.array(),indirect.getIndex(),indirect.length()); return _resource.getInputStream(); }
public InputStream getInputStream() throws IOException { Buffer indirect = getIndirectBuffer(); if (indirect!=null && indirect.array()!=null) return new ByteArrayInputStream(indirect.array(),indirect.getIndex(),indirect.length()); return _resource.getInputStream(); }
public InputStream getInputStream() throws IOException { Buffer indirect = getIndirectBuffer(); if (indirect!=null && indirect.array()!=null) return new ByteArrayInputStream(indirect.array(),indirect.getIndex(),indirect.length()); return _resource.getInputStream(); }
public View(Buffer buffer) { super(READWRITE,!buffer.isImmutable()); _buffer=buffer.buffer(); setPutIndex(buffer.putIndex()); setGetIndex(buffer.getIndex()); setMarkIndex(buffer.markIndex()); _access=buffer.isReadOnly()?READONLY:READWRITE; }
public View(Buffer buffer) { super(READWRITE,!buffer.isImmutable()); _buffer=buffer.buffer(); setPutIndex(buffer.putIndex()); setGetIndex(buffer.getIndex()); setMarkIndex(buffer.markIndex()); _access=buffer.isReadOnly()?READONLY:READWRITE; }
public View(Buffer buffer) { super(READWRITE,!buffer.isImmutable()); _buffer=buffer.buffer(); setPutIndex(buffer.putIndex()); setGetIndex(buffer.getIndex()); setMarkIndex(buffer.markIndex()); _access=buffer.isReadOnly()?READONLY:READWRITE; }