public void write(int b) throws IOException { if(position<maxPosition) { // revisiting previous content; do nothing but advance position position++; return; } if(recording) { record(b); } if (this.out != null) { this.out.write(b); } checkLimits(); }
public void write(byte[] b, int off, int len) throws IOException { if(position < maxPosition) { if(position+len<=maxPosition) { // revisiting; do nothing but advance position position += len; return; } // consume part of the array doing nothing but advancing position long consumeRange = maxPosition - position; position += consumeRange; off += consumeRange; len -= consumeRange; } if(recording) { record(b, off, len); } if (this.out != null) { this.out.write(b, off, len); } checkLimits(); }
public void write(int b) throws IOException { if(position<maxPosition) { // revisiting previous content; do nothing but advance position position++; return; } if(recording) { record(b); } if (this.out != null) { this.out.write(b); } // see comment on int[] lastTwoBytes if (messageBodyBeginMark < 0l) { // looking for "\n\n" or "\n\r\n" if (b == '\n' && (lastTwoBytes[1] == '\n' || (lastTwoBytes[0] == '\n' && lastTwoBytes[1] == '\r'))) { markMessageBodyBegin(); } else { lastTwoBytes[0] = lastTwoBytes[1]; lastTwoBytes[1] = b; } } checkLimits(); }
public void write(int b) throws IOException { if(position<maxPosition) { // revisiting previous content; do nothing but advance position position++; return; } if(recording) { record(b); } if (this.out != null) { this.out.write(b); } // see comment on int[] lastTwoBytes if (messageBodyBeginMark < 0l) { // looking for "\n\n" or "\n\r\n" if (b == '\n' && (lastTwoBytes[1] == '\n' || (lastTwoBytes[0] == '\n' && lastTwoBytes[1] == '\r'))) { markMessageBodyBegin(); } else { lastTwoBytes[0] = lastTwoBytes[1]; lastTwoBytes[1] = b; } } checkLimits(); }
recordingOutputStream.checkLimits(); } catch (SocketException se) { throw se;
recordingOutputStream.checkLimits(); } catch (SocketException se) { throw se;
recordingOutputStream.checkLimits(); } catch (SocketException se) { throw se;
recordingOutputStream.checkLimits(); } catch (SocketException se) { throw se;
recordingOutputStream.checkLimits(); } catch (SocketException se) { throw se;