@Override public void write(IApimanBuffer chunk) { buffer.append(chunk); } @Override
@Override public void write(IApimanBuffer chunk) { dataBuffer.append(chunk); } @Override
@Override public void write(IApimanBuffer chunk) { data.append(chunk); } @Override
@Override public void write(IApimanBuffer chunk) { data.append(chunk); } @Override
@Override public void write(IApimanBuffer chunk) { buffer.append(chunk); } @Override
@Override public void write(IApimanBuffer chunk) { dataBuffer.append(chunk); } @Override
/** * @see io.apiman.gateway.engine.io.AbstractStream#write(io.apiman.gateway.engine.io.IApimanBuffer) */ @Override public void write(IApimanBuffer chunk) { if (buffer == null) { buffer = bufferFactory.cloneBuffer(chunk); } else { buffer.append(chunk); } atEnd = false; processBuffer(); }
/** * Append the given data to any existing buffer, then scan the buffer * looking for the soap headers. If scanning is complete, this method * will return true. If more data is required, then the method will return * false. If an error condition is detected, then an exception will be * thrown. * @param buffer */ public boolean scan(IApimanBuffer buffer) throws SoapEnvelopeNotFoundException { if (this.buffer == null) { this.buffer = buffer; } else { this.buffer.append(buffer); } boolean scanComplete = doScan(); // If our buffer is already "max size" but we haven't found the start of the // soap envelope yet, then we're likely not going to find it. if (!scanComplete && this.buffer.length() >= getMaxBufferLength()) { throw new SoapEnvelopeNotFoundException(); } return scanComplete; }
/** * Append the given data to any existing buffer, then scan the buffer * looking for the soap headers. If scanning is complete, this method * will return true. If more data is required, then the method will return * false. If an error condition is detected, then an exception will be * thrown. * @param buffer */ public boolean scan(IApimanBuffer buffer) throws SoapEnvelopeNotFoundException { if (this.buffer == null) { this.buffer = buffer; } else { this.buffer.append(buffer); } boolean scanComplete = doScan(); // If our buffer is already "max size" but we haven't found the start of the // soap envelope yet, then we're likely not going to find it. if (!scanComplete && this.buffer.length() >= getMaxBufferLength()) { throw new SoapEnvelopeNotFoundException(); } return scanComplete; }