Browse Source

Javadoc fine-tuning for 4.2

pull/830/merge
Juergen Hoeller 11 years ago
parent
commit
265cd2ad1e
  1. 9
      spring-core/src/main/java/org/springframework/util/FastByteArrayOutputStream.java
  2. 2
      spring-core/src/main/java/org/springframework/util/ResizableByteArrayOutputStream.java
  3. 4
      spring-web/src/main/java/org/springframework/web/util/ContentCachingResponseWrapper.java

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

@ -24,7 +24,9 @@ import java.util.Iterator;
import java.util.LinkedList; import java.util.LinkedList;
/** /**
* A speedy alternative to {@link java.io.ByteArrayOutputStream}. * A speedy alternative to {@link java.io.ByteArrayOutputStream}. Note that
* this variant does <i>not</i> extend {@code ByteArrayOutputStream}, unlike
* its sibling {@link ResizableByteArrayOutputStream}.
* *
* <p>Unlike {@link java.io.ByteArrayOutputStream}, this implementation is backed * <p>Unlike {@link java.io.ByteArrayOutputStream}, this implementation is backed
* by a {@link java.util.LinkedList} of {@code byte[]} instead of 1 constantly * by a {@link java.util.LinkedList} of {@code byte[]} instead of 1 constantly
@ -35,9 +37,12 @@ import java.util.LinkedList;
* with the {@link #writeTo(OutputStream)} method. * with the {@link #writeTo(OutputStream)} method.
* *
* @author Craig Andrews * @author Craig Andrews
* @author Juergen Hoeller
* @since 4.2 * @since 4.2
* @see #resize
* @see ResizableByteArrayOutputStream
*/ */
public final class FastByteArrayOutputStream extends OutputStream { public class FastByteArrayOutputStream extends OutputStream {
private static final int DEFAULT_BLOCK_SIZE = 256; private static final int DEFAULT_BLOCK_SIZE = 256;

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

@ -35,6 +35,8 @@ import java.io.ByteArrayOutputStream;
* @author Brian Clozel * @author Brian Clozel
* @author Juergen Hoeller * @author Juergen Hoeller
* @since 4.0.3 * @since 4.0.3
* @see #resize
* @see FastByteArrayOutputStream
*/ */
public class ResizableByteArrayOutputStream extends ByteArrayOutputStream { public class ResizableByteArrayOutputStream extends ByteArrayOutputStream {

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

@ -170,6 +170,7 @@ public class ContentCachingResponseWrapper extends HttpServletResponseWrapper {
/** /**
* Return an {@link InputStream} to the cached content. * Return an {@link InputStream} to the cached content.
* @since 4.2
*/ */
public InputStream getContentInputStream(){ public InputStream getContentInputStream(){
return this.content.getInputStream(); return this.content.getInputStream();
@ -177,6 +178,7 @@ public class ContentCachingResponseWrapper extends HttpServletResponseWrapper {
/** /**
* Return the current size of the cached content. * Return the current size of the cached content.
* @since 4.2
*/ */
public int getContentSize(){ public int getContentSize(){
return this.content.size(); return this.content.size();
@ -184,6 +186,7 @@ public class ContentCachingResponseWrapper extends HttpServletResponseWrapper {
/** /**
* Copy the complete cached body content to the response. * Copy the complete cached body content to the response.
* @since 4.2
*/ */
public void copyBodyToResponse() throws IOException { public void copyBodyToResponse() throws IOException {
copyBodyToResponse(true); copyBodyToResponse(true);
@ -193,6 +196,7 @@ public class ContentCachingResponseWrapper extends HttpServletResponseWrapper {
* Copy the cached body content to the response. * Copy the cached body content to the response.
* @param complete whether to set a corresponding content length * @param complete whether to set a corresponding content length
* for the complete cached body content * for the complete cached body content
* @since 4.2
*/ */
protected void copyBodyToResponse(boolean complete) throws IOException { protected void copyBodyToResponse(boolean complete) throws IOException {
if (this.content.size() > 0) { if (this.content.size() > 0) {

Loading…
Cancel
Save