atg.server.http
Class TestingHttpConnectionServletInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by javax.servlet.ServletInputStream
          extended by atg.server.http.HttpConnectionServletInputStream
              extended by atg.server.http.TestingHttpConnectionServletInputStream
All Implemented Interfaces:
java.io.Closeable

public class TestingHttpConnectionServletInputStream
extends atg.server.http.HttpConnectionServletInputStream

A version of HttpConnectionServletInputStream that allows one to specify the content length parameter. This is useful for writing unit tests since the base class does not allow the content length to be set by callers outside of its package.

Version:
$Id: $
Author:
Adam Belmont
See Also:
HttpConnectionServletInputStream

Field Summary
static java.lang.String CLASS_VERSION
           
 
Constructor Summary
TestingHttpConnectionServletInputStream(java.io.InputStream pIn, int pContentLength)
          Constructs a new HttpConnectionServletInputStream that gets its input from the specified InputStream
 
Method Summary
 int getRequestContentLength()
           
 void setRequestContentLength(int pRequestContentLength)
           
 
Methods inherited from class atg.server.http.HttpConnectionServletInputStream
available, getInputStream, read, read, read, readLine, setInputStream
 
Methods inherited from class java.io.InputStream
close, mark, markSupported, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static final java.lang.String CLASS_VERSION
See Also:
Constant Field Values
Constructor Detail

TestingHttpConnectionServletInputStream

public TestingHttpConnectionServletInputStream(java.io.InputStream pIn,
                                               int pContentLength)
Constructs a new HttpConnectionServletInputStream that gets its input from the specified InputStream

Parameters:
pIn - the InputStream this will use to read its input
pContentLength - The "content length" size typically sent by an HttpClient
Method Detail

getRequestContentLength

public int getRequestContentLength()
Overrides:
getRequestContentLength in class atg.server.http.HttpConnectionServletInputStream

setRequestContentLength

public void setRequestContentLength(int pRequestContentLength)
Overrides:
setRequestContentLength in class atg.server.http.HttpConnectionServletInputStream


Copyright © 2009. All Rights Reserved.