Package org.vx68k.bitbucket.stub
Class StubServletResponse
- java.lang.Object
-
- org.vx68k.bitbucket.stub.StubServletResponse
-
- All Implemented Interfaces:
ServletResponse
- Direct Known Subclasses:
StubHttpServletResponse
public class StubServletResponse extends Object implements ServletResponse
Stub implementation ofServletResponse.- Since:
- 5.0
- Author:
- Kaz Nishimura
-
-
Constructor Summary
Constructors Constructor Description StubServletResponse(ServletOutputStream stream)Constructs this object with aServletOutputStreamobject.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckNotCommitted()Checks if this response is not committed.protected voidcommit()Marks this response is committed.voidflushBuffer()intgetBufferSize()StringgetCharacterEncoding()StringgetContentType()LocalegetLocale()ServletOutputStreamgetOutputStream()PrintWritergetWriter()booleanisCommitted()voidreset()voidresetBuffer()voidsetBufferSize(int size)voidsetCharacterEncoding(String value)voidsetContentLength(int contentLength)voidsetContentLengthLong(long len)voidsetContentType(String value)voidsetLocale(Locale value)
-
-
-
Constructor Detail
-
StubServletResponse
public StubServletResponse(ServletOutputStream stream)
Constructs this object with aServletOutputStreamobject.- Parameters:
stream-ServletOutputStreamobject
-
-
Method Detail
-
commit
protected final void commit()
Marks this response is committed.
-
checkNotCommitted
protected final void checkNotCommitted()
Checks if this response is not committed.- Throws:
IllegalStateException- if this response is committed
-
getOutputStream
public final ServletOutputStream getOutputStream()
- Specified by:
getOutputStreamin interfaceServletResponse
-
getWriter
public final PrintWriter getWriter()
- Specified by:
getWriterin interfaceServletResponse
-
reset
public void reset()
- Specified by:
resetin interfaceServletResponse
-
flushBuffer
public void flushBuffer() throws IOException- Specified by:
flushBufferin interfaceServletResponse- Throws:
IOException
-
resetBuffer
public void resetBuffer()
- Specified by:
resetBufferin interfaceServletResponse
-
isCommitted
public final boolean isCommitted()
- Specified by:
isCommittedin interfaceServletResponse
-
getBufferSize
public int getBufferSize()
- Specified by:
getBufferSizein interfaceServletResponse
-
setBufferSize
public void setBufferSize(int size)
- Specified by:
setBufferSizein interfaceServletResponse
-
getContentType
public final String getContentType()
- Specified by:
getContentTypein interfaceServletResponse
-
setContentType
public final void setContentType(String value)
- Specified by:
setContentTypein interfaceServletResponse
-
getCharacterEncoding
public final String getCharacterEncoding()
- Specified by:
getCharacterEncodingin interfaceServletResponse
-
setCharacterEncoding
public final void setCharacterEncoding(String value)
- Specified by:
setCharacterEncodingin interfaceServletResponse
-
getLocale
public final Locale getLocale()
- Specified by:
getLocalein interfaceServletResponse
-
setLocale
public final void setLocale(Locale value)
- Specified by:
setLocalein interfaceServletResponse
-
setContentLength
public void setContentLength(int contentLength)
- Specified by:
setContentLengthin interfaceServletResponse
-
setContentLengthLong
public void setContentLengthLong(long len)
- Specified by:
setContentLengthLongin interfaceServletResponse
-
-