提交 ecc6a5ae 编写于 作者: P Phillip Webb 提交者: Rossen Stoyanchev

Improve SimpleStreamingClientHttpRequest performance

Ensure that NonClosingOutputStream calls with a byte array call the
corresponding methods of the underlying OutputStream rather than
relying on the default NonClosingOutputStream implementation, which
writes one bte at a time. This significantly improves performance.

Issues: SPR-9530
上级 dc822cdc
/*
* Copyright 2002-2011 the original author or authors.
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -113,6 +113,16 @@ final class SimpleStreamingClientHttpRequest extends AbstractClientHttpRequest {
super(out);
}
@Override
public void write(byte[] b) throws IOException {
super.write(b);
}
@Override
public void write(byte[] b, int off, int let) throws IOException {
out.write(b, off, let);
}
@Override
public void close() throws IOException {
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册