Skip to content

Commit 265cd2a

Browse files
committed
Javadoc fine-tuning for 4.2
1 parent 0411435 commit 265cd2a

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

spring-core/src/main/java/org/springframework/util/FastByteArrayOutputStream.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
import java.util.LinkedList;
2525

2626
/**
27-
* A speedy alternative to {@link java.io.ByteArrayOutputStream}.
27+
* A speedy alternative to {@link java.io.ByteArrayOutputStream}. Note that
28+
* this variant does <i>not</i> extend {@code ByteArrayOutputStream}, unlike
29+
* its sibling {@link ResizableByteArrayOutputStream}.
2830
*
2931
* <p>Unlike {@link java.io.ByteArrayOutputStream}, this implementation is backed
3032
* by a {@link java.util.LinkedList} of {@code byte[]} instead of 1 constantly
@@ -35,9 +37,12 @@
3537
* with the {@link #writeTo(OutputStream)} method.
3638
*
3739
* @author Craig Andrews
40+
* @author Juergen Hoeller
3841
* @since 4.2
42+
* @see #resize
43+
* @see ResizableByteArrayOutputStream
3944
*/
40-
public final class FastByteArrayOutputStream extends OutputStream {
45+
public class FastByteArrayOutputStream extends OutputStream {
4146

4247
private static final int DEFAULT_BLOCK_SIZE = 256;
4348

spring-core/src/main/java/org/springframework/util/ResizableByteArrayOutputStream.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
* @author Brian Clozel
3636
* @author Juergen Hoeller
3737
* @since 4.0.3
38+
* @see #resize
39+
* @see FastByteArrayOutputStream
3840
*/
3941
public class ResizableByteArrayOutputStream extends ByteArrayOutputStream {
4042

spring-web/src/main/java/org/springframework/web/util/ContentCachingResponseWrapper.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,20 +170,23 @@ public byte[] getContentAsByteArray() {
170170

171171
/**
172172
* Return an {@link InputStream} to the cached content.
173+
* @since 4.2
173174
*/
174175
public InputStream getContentInputStream(){
175176
return this.content.getInputStream();
176177
}
177178

178179
/**
179180
* Return the current size of the cached content.
181+
* @since 4.2
180182
*/
181183
public int getContentSize(){
182184
return this.content.size();
183185
}
184186

185187
/**
186188
* Copy the complete cached body content to the response.
189+
* @since 4.2
187190
*/
188191
public void copyBodyToResponse() throws IOException {
189192
copyBodyToResponse(true);
@@ -193,6 +196,7 @@ public void copyBodyToResponse() throws IOException {
193196
* Copy the cached body content to the response.
194197
* @param complete whether to set a corresponding content length
195198
* for the complete cached body content
199+
* @since 4.2
196200
*/
197201
protected void copyBodyToResponse(boolean complete) throws IOException {
198202
if (this.content.size() > 0) {

0 commit comments

Comments
 (0)